home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 21 / Cream of the Crop 21 (Terry Blount) (October 1996).iso / doom / relwep12.zip / RELWEP12.PAT < prev    next >
Text File  |  1996-08-20  |  106KB  |  3,376 lines

  1. diff -ur --new-file v101qc/cbnmods.qc progs/cbnmods.qc
  2. --- v101qc/cbnmods.qc    Thu Jan  1 08:00:00 1970
  3. +++ progs/cbnmods.qc    Tue Aug 20 19:12:26 1996
  4. @@ -0,0 +1,197 @@
  5. +/*-------------------------------------------------------------------
  6. +Filename : cbnmods.qc
  7. +Author   : Cameron Newham
  8. +Version  : 1.2
  9. +Date     : 96/08/20
  10. +
  11. +Description
  12. +-----------
  13. +Provides routines specific to my patches.  See the description
  14. +file that came with the archive for further details.
  15. +
  16. +Public Entry Points
  17. +-------------------
  18. +CN_Missile_Bubbles
  19. +CN_Missile_Think
  20. +CN_Ditch_Rockets
  21. +--------------------------------------------------------------------*/
  22. +
  23. +void() bubble_bob;
  24. +void() GrenadeExplode; //Needed for CN_Missile_Think
  25. +void(float num_bubbles) DeathBubbles;
  26. +
  27. +/*-------------------------------------------------------------------
  28. +Slightly modified version of Id's DeathBubblesSpawn
  29. +--------------------------------------------------------------------*/
  30. +void() MissileBubblesSpawn =
  31. +{
  32. +local entity    bubble;
  33. +        bubble = spawn();
  34. +        setmodel (bubble, "progs/s_bubble.spr");
  35. +        setorigin (bubble, self.owner.origin);
  36. +        bubble.movetype = MOVETYPE_NOCLIP;
  37. +        bubble.solid = SOLID_NOT;
  38. +        bubble.velocity = '0 0 15';
  39. +        bubble.nextthink = time + 0.5;
  40. +        bubble.think = bubble_bob;
  41. +        bubble.classname = "bubble";
  42. +        bubble.frame = 0;
  43. +        bubble.cnt = 0;
  44. +        setsize (bubble, '-8 -8 -8', '8 8 8');
  45. +        self.nextthink = time + 0.1;
  46. +        self.think = MissileBubblesSpawn;
  47. +        self.air_finished = self.air_finished + 1;
  48. +        if (self.air_finished >= self.bubble_count)
  49. +                remove(self);
  50. +};
  51. +
  52. +/*---------------------CN_Missile_Bubbles----------------------------
  53. +Makes an underwater entity look like a real underwater entity by
  54. +spraying out bubbles.  This is designed for use with rockets.
  55. +--------------------------------------------------------------------*/
  56. +void(float num_bubbles) CN_Missile_Bubbles =
  57. +{
  58. +  local vector  rocket_origin;
  59. +  local entity  bubble_spawner;
  60. +        
  61. +        //rocket_origin = self.origin + ('0 -50 -50');
  62. +        bubble_spawner = spawn();
  63. +        setorigin (bubble_spawner, self.origin + '0 0 -60');
  64. +        bubble_spawner.movetype = MOVETYPE_NONE;
  65. +        bubble_spawner.solid = SOLID_NOT;
  66. +        bubble_spawner.nextthink = time + 0.1;
  67. +        bubble_spawner.think = MissileBubblesSpawn;
  68. +        bubble_spawner.air_finished = 0;
  69. +        bubble_spawner.owner = self;
  70. +        bubble_spawner.bubble_count = num_bubbles;
  71. +        return;
  72. +};
  73. +
  74. +
  75. +/*----------------------CN_Missile_Think-----------------------------
  76. +Missile Velocity Correction.
  77. +Correct the velocity of spikes, rockets and grenades underwater.  
  78. +Simulates water resistance.  Also calls CN_Missile_Bubbles for rockets
  79. +underwater.  Rockets are slowed in water and speed up again in air,
  80. +while grenades are slowed by each passage through water.
  81. +--------------------------------------------------------------------*/
  82. +void() CN_Missile_Think =
  83. +{
  84. +  local vector v1;
  85. +  local vector v2;
  86. +
  87. +  // if it's a grenade then we must make it explode after
  88. +  // it's duration expires
  89. +
  90. +  if ((self.classname == "grenade") && (time > self.duration))
  91. +  {
  92. +    // this is a grenade and it's past its use-by date
  93. +    self.think = GrenadeExplode;
  94. +    self.nextthink = time + 0.1;
  95. +  }
  96. +  else
  97. +  if (self.duration < time)
  98. +    self.think = SUB_Remove;
  99. +  else
  100. +  {
  101. +    self.nextthink = time + 0.1;
  102. +
  103. +    v1 = self.origin;
  104. +    v2 = v1;
  105. +    traceline (v1, v2, TRUE, self);
  106. +
  107. +    if (trace_inwater == TRUE) 
  108. +    {
  109. +      if ((random() > 0.72) && (self.classname == "rocket"))
  110. +        CN_Missile_Bubbles(1);
  111. +
  112. +      if (self.jump_flag == FALSE)
  113. +      {
  114. +        // correct velocity underwater if not underwater
  115. +        // (jump_flag) already.
  116. +        self.jump_flag = TRUE;  // now in water
  117. +        self.swim_flag = TRUE;  // water->air transition not done
  118. +        self.velocity = self.velocity * 0.4292;
  119. +        self.angles = vectoangles(self.velocity);
  120. +      }
  121. +    }
  122. +    else
  123. +    {
  124. +      // make sure we only do this for 1 water/surf transition
  125. +      if (self.swim_flag == TRUE) 
  126. +      {
  127. +        if (self.classname == "rocket")
  128. +        {
  129. +          // correct velocity out of water for rockets
  130. +          self.velocity = self.velocity * 2.33;
  131. +        }
  132. +        self.jump_flag = FALSE;  //out of water
  133. +        self.swim_flag = FALSE;  //water->air transition finished
  134. +      }
  135. +    }
  136. +  }
  137. +  
  138. +};
  139. +
  140. +/*------------------------CN_Ditch_Rockets---------------------------
  141. +Removes half your rockets, places them in a backpack and ejects
  142. +it to the world.  You'll need this for when you get too many rockets
  143. +and get weighed down.
  144. +--------------------------------------------------------------------*/
  145. +void() CN_Ditch_Rockets =
  146. +{
  147. +        local entity back_pack;
  148. +        local float  num_to_ditch;  
  149. +
  150. +        // if we have none or one then return!
  151. +        if (self.ammo_rockets < 2)
  152. +          return;
  153. +
  154. +        // spawn a backpack
  155. +        back_pack = spawn();
  156. +
  157. +        // calculate number to ditch and set appropriate amounts
  158. +        // for entity and backpack
  159. +        num_to_ditch = self.ammo_rockets / 2;
  160. +        num_to_ditch = floor(num_to_ditch);
  161. +        back_pack.ammo_rockets = num_to_ditch;
  162. +        self.ammo_rockets = self.ammo_rockets - num_to_ditch;
  163. +
  164. +
  165. +        back_pack.owner = self;
  166. +        makevectors(self.v_angle);
  167. +        setorigin(back_pack, self.origin + '0 0 45');
  168. +        back_pack.velocity = aim(self, 1000);
  169. +        back_pack.velocity_x = back_pack.velocity_x * -340;
  170. +        back_pack.velocity_y = back_pack.velocity_y * -340;
  171. +        back_pack.velocity_z = back_pack.velocity_z * 380;
  172. +        back_pack.angles = vectoangles(back_pack.velocity);
  173. +        back_pack.flags = FL_ITEM;
  174. +        back_pack.solid = SOLID_TRIGGER;
  175. +        back_pack.movetype = MOVETYPE_TOSS;
  176. +        back_pack.nextthink = time + 0.2;
  177. +
  178. +        setmodel (back_pack, "progs/backpack.mdl");
  179. +        setsize(back_pack, '-16 -16 0', '16 16 56');
  180. +        back_pack.touch = BackpackTouch;
  181. +        back_pack.nextthink = time + 120;    // remove pack after 120 secs
  182. +        back_pack.think = SUB_Remove;
  183. +
  184. +        sprint(self, "Dumped Rockets\n");
  185. +
  186. +        W_SetCurrentAmmo();
  187. +};
  188. +
  189. +/*--------------------CN_Client_Init_Think---------------------------
  190. +Startup messages
  191. +--------------------------------------------------------------------*/
  192. +void() CN_Client_Init_Think =
  193. +{
  194. +  sprint (self, "Realistic Weapons Mod by C. Newham (w_australia)\n");
  195. +  sprint (self, "Version 1.2\n");
  196. +  sprint (self, "* weapons unreliable\n");
  197. +  sprint (self, "* rockets add weight\n");
  198. +  sprint (self, "* recoil effects\n");
  199. +  sprint (self, "* 200pc health speed increase\n");
  200. +  sprint (self, "* impulse 20 - dump rockets\n");
  201. +};
  202. diff -ur --new-file v101qc/client.qc progs/client.qc
  203. --- v101qc/client.qc    Sun Aug 18 02:29:36 1996
  204. +++ progs/client.qc    Tue Aug 20 18:54:34 1996
  205. @@ -7,7 +7,7 @@
  206.  void (vector org) spawn_tfog;
  207.  void (vector org, entity death_owner) spawn_tdeath;
  208.  
  209. -float    modelindex_eyes, modelindex_player;
  210. +float   modelindex_eyes, modelindex_player;
  211.  
  212.  /*
  213.  =============================================================================
  214. @@ -17,8 +17,8 @@
  215.  =============================================================================
  216.  */
  217.  
  218. -float    intermission_running;
  219. -float    intermission_exittime;
  220. +float   intermission_running;
  221. +float   intermission_exittime;
  222.  
  223.  /*QUAKED info_intermission (1 0.5 0.5) (-16 -16 -16) (16 16 16)
  224.  This is the camera point for the intermission.
  225. @@ -73,7 +73,7 @@
  226.      if (serverflags)
  227.      {
  228.          if (world.model == "maps/start.bsp")
  229. -            SetNewParms ();        // take away all stuff on starting new episode
  230. +            SetNewParms ();         // take away all stuff on starting new episode
  231.      }
  232.      
  233.      self.items = parm1;
  234. @@ -96,13 +96,13 @@
  235.  */
  236.  entity() FindIntermission =
  237.  {
  238. -    local    entity spot;
  239. -    local    float cyc;
  240. +    local   entity spot;
  241. +    local   float cyc;
  242.  
  243.  // look for info_intermission first
  244.      spot = find (world, classname, "info_intermission");
  245.      if (spot)
  246. -    {    // pick a random one
  247. +    {       // pick a random one
  248.          cyc = random() * 4;
  249.          while (cyc > 1)
  250.          {
  251. @@ -131,7 +131,7 @@
  252.  string nextmap;
  253.  void() GotoNextMap =
  254.  {
  255. -    if (cvar("samelevel"))    // if samelevel is set, stay on same level
  256. +    if (cvar("samelevel"))  // if samelevel is set, stay on same level
  257.          changelevel (mapname);
  258.      else
  259.          changelevel (nextmap);
  260. @@ -209,7 +209,7 @@
  261.      if (intermission_running == 3)
  262.      {
  263.          if (!cvar("registered"))
  264. -        {    // shareware episode has been completed, go to sell screen
  265. +        {       // shareware episode has been completed, go to sell screen
  266.              WriteByte (MSG_ALL, SVC_SELLSCREEN);
  267.              return;
  268.          }
  269. @@ -246,7 +246,7 @@
  270.  
  271.  void() execute_changelevel =
  272.  {
  273. -    local entity    pos;
  274. +    local entity    pos;
  275.  
  276.      intermission_running = 1;
  277.      
  278. @@ -267,7 +267,7 @@
  279.      {
  280.          other.view_ofs = '0 0 0';
  281.          other.angles = other.v_angle = pos.mangle;
  282. -        other.fixangle = TRUE;        // turn this way immediately
  283. +        other.fixangle = TRUE;          // turn this way immediately
  284.          other.nextthink = time + 0.5;
  285.          other.takedamage = DAMAGE_NO;
  286.          other.solid = SOLID_NOT;
  287. @@ -275,7 +275,7 @@
  288.          other.modelindex = 0;
  289.          setorigin (other, pos.origin);
  290.          other = find (other, classname, "player");
  291. -    }    
  292. +    }       
  293.  
  294.      WriteByte (MSG_ALL, SVC_INTERMISSION);
  295.  };
  296. @@ -283,7 +283,7 @@
  297.  
  298.  void() changelevel_touch =
  299.  {
  300. -    local entity    pos;
  301. +    local entity    pos;
  302.  
  303.      if (other.classname != "player")
  304.          return;
  305. @@ -301,7 +301,7 @@
  306.      SUB_UseTargets ();
  307.  
  308.      if ( (self.spawnflags & 1) && (deathmatch == 0) )
  309. -    {    // NO_INTERMISSION
  310. +    {       // NO_INTERMISSION
  311.          GotoNextMap();
  312.          return;
  313.      }
  314. @@ -346,7 +346,7 @@
  315.          CopyToBodyQue (self);
  316.          // get the spawn parms as they were at level start
  317.          setspawnparms (self);
  318. -        // respawn        
  319. +        // respawn              
  320.          PutClientInServer ();
  321.      }
  322.      else if (deathmatch)
  323. @@ -355,11 +355,11 @@
  324.          CopyToBodyQue (self);
  325.          // set default spawn parms
  326.          SetNewParms ();
  327. -        // respawn        
  328. +        // respawn              
  329.          PutClientInServer ();
  330.      }
  331.      else
  332. -    {    // restart the entire server
  333. +    {       // restart the entire server
  334.          localcmd ("restart\n");
  335.      }
  336.  };
  337. @@ -378,7 +378,7 @@
  338.      bprint (" suicides\n");
  339.      set_suicide_frame ();
  340.      self.modelindex = modelindex_player;
  341. -    self.frags = self.frags - 2;    // extra penalty
  342. +    self.frags = self.frags - 2;    // extra penalty
  343.      respawn ();
  344.  };
  345.  
  346. @@ -396,7 +396,7 @@
  347.  */
  348.  entity() SelectSpawnPoint =
  349.  {
  350. -    local    entity spot;
  351. +    local   entity spot;
  352.      
  353.  // testinfo_player_start is only found in regioned levels
  354.      spot = find (world, classname, "testplayerstart");
  355. @@ -422,7 +422,7 @@
  356.      }
  357.  
  358.      if (serverflags)
  359. -    {    // return with a rune to start
  360. +    {       // return with a rune to start
  361.          spot = find (world, classname, "info_player_start2");
  362.          if (spot)
  363.              return spot;
  364. @@ -448,7 +448,7 @@
  365.  
  366.  void() PutClientInServer =
  367.  {
  368. -    local    entity spot;
  369. +    local   entity spot;
  370.  
  371.      self.classname = "player";
  372.      self.health = 100;
  373. @@ -459,7 +459,7 @@
  374.      self.max_health = 100;
  375.      self.flags = FL_CLIENT;
  376.      self.air_finished = time + 12;
  377. -    self.dmg = 2;           // initial water damage
  378. +    self.dmg = 2;                   // initial water damage
  379.      self.super_damage_finished = 0;
  380.      self.radsuit_finished = 0;
  381.      self.invisible_finished = 0;
  382. @@ -467,6 +467,26 @@
  383.      self.effects = 0;
  384.      self.invincible_time = 0;
  385.  
  386. +// CN_PATCH - Aug 96: unreliable weapons code
  387. +    self.use_counter_shot = 0;
  388. +    self.use_last_shot = 0;
  389. +    self.use_av_shot = 0;
  390. +    self.jammed_shot = 0;
  391. +    self.use_counter_rocket = 0;
  392. +    self.use_last_rocket = 0;
  393. +    self.use_av_rocket = 0;
  394. +    self.jammed_rocket = 0;
  395. +    self.use_counter_gl = 0;
  396. +    self.use_last_gl = 0;
  397. +    self.use_av_gl = 0;
  398. +    self.jammed_gl = 0;
  399. +    self.use_counter_ss = 0;
  400. +    self.use_last_ss = 0;
  401. +    self.use_av_ss = 0;
  402. +    self.jammed_ss = 0;
  403. +    self.jammed_death = 0;
  404. +//END CN_PATCH
  405. +
  406.      DecodeLevelParms ();
  407.      
  408.      W_SetCurrentAmmo ();
  409. @@ -483,7 +503,7 @@
  410.  
  411.      self.origin = spot.origin + '0 0 1';
  412.      self.angles = spot.angles;
  413. -    self.fixangle = TRUE;        // turn this way immediately
  414. +    self.fixangle = TRUE;           // turn this way immediately
  415.  
  416.  // oh, this is a hack!
  417.      setmodel (self, "progs/eyes.mdl");
  418. @@ -505,6 +525,10 @@
  419.      }
  420.  
  421.      spawn_tdeath (self.origin, self);
  422. +//CN_PATCH - set up for Client initialisation
  423. +  self.nextthink = time + 0.1;
  424. +  self.think = CN_Client_Init_Think;
  425. +//END CN_PATCH
  426.  };
  427.  
  428.  
  429. @@ -581,7 +605,7 @@
  430.  
  431.  void() DumpScore =
  432.  {
  433. -    local entity    e, sort, walk;
  434. +    local entity    e, sort, walk;
  435.  
  436.      if (world.chain)
  437.          error ("DumpScore: world.chain is set");
  438. @@ -629,7 +653,7 @@
  439.  
  440.  // print the list
  441.      
  442. -    bprint ("\n");    
  443. +    bprint ("\n");  
  444.      while (sort)
  445.      {
  446.          PrintClientScore (sort);
  447. @@ -648,7 +672,7 @@
  448.  // find a trigger changelevel
  449.      o = find(world, classname, "trigger_changelevel");
  450.      if (!o || mapname == "start")
  451. -    {    // go back to same map if no trigger_changelevel
  452. +    {       // go back to same map if no trigger_changelevel
  453.          o = spawn();
  454.          o.map = mapname;
  455.      }
  456. @@ -671,10 +695,10 @@
  457.  */
  458.  void() CheckRules =
  459.  {
  460. -    local    float        timelimit;
  461. -    local    float        fraglimit;
  462. +    local   float           timelimit;
  463. +    local   float           fraglimit;
  464.      
  465. -    if (gameover)    // someone else quit the game already
  466. +    if (gameover)   // someone else quit the game already
  467.          return;
  468.          
  469.      timelimit = cvar("timelimit") * 60;
  470. @@ -708,15 +732,15 @@
  471.          localcmd ("killserver\n");
  472.  */
  473.          return;
  474. -    }    
  475. +    }       
  476.  };
  477.  
  478.  //============================================================================
  479.  
  480.  void() PlayerDeathThink =
  481.  {
  482. -    local entity    old_self;
  483. -    local float        forward;
  484. +    local entity    old_self;
  485. +    local float             forward;
  486.  
  487.      if ((self.flags & FL_ONGROUND))
  488.      {
  489. @@ -724,7 +748,7 @@
  490.          forward = forward - 20;
  491.          if (forward <= 0)
  492.              self.velocity = '0 0 0';
  493. -        else    
  494. +        else    
  495.              self.velocity = forward * normalize(self.velocity);
  496.      }
  497.  
  498. @@ -781,11 +805,11 @@
  499.          return;
  500.  
  501.      if ( !(self.flags & FL_JUMPRELEASED) )
  502. -        return;        // don't pogo stick
  503. +        return;         // don't pogo stick
  504.  
  505.      self.flags = self.flags - (self.flags & FL_JUMPRELEASED);
  506.  
  507. -    self.flags = self.flags - FL_ONGROUND;    // don't stairwalk
  508. +    self.flags = self.flags - FL_ONGROUND;  // don't stairwalk
  509.      
  510.      self.button2 = 0;
  511.  // player jumping sound
  512. @@ -800,7 +824,7 @@
  513.  
  514.  ============
  515.  */
  516. -.float    dmgtime;
  517. +.float  dmgtime;
  518.  
  519.  void() WaterMove =
  520.  {
  521. @@ -820,7 +844,7 @@
  522.          self.dmg = 2;
  523.      }
  524.      else if (self.air_finished < time)
  525. -    {    // drown!
  526. +    {       // drown!
  527.          if (self.pain_finished < time)
  528.          {
  529.              self.dmg = self.dmg + 2;
  530. @@ -834,7 +858,7 @@
  531.      if (!self.waterlevel)
  532.      {
  533.          if (self.flags & FL_INWATER)
  534. -        {    
  535. +        {       
  536.              // play leave water sound
  537.              sound (self, CHAN_BODY, "misc/outwater.wav", 1, ATTN_NORM);
  538.              self.flags = self.flags - FL_INWATER;
  539. @@ -843,7 +867,7 @@
  540.      }
  541.  
  542.      if (self.watertype == CONTENT_LAVA)
  543. -    {    // do damage
  544. +    {       // do damage
  545.          if (self.dmgtime < time)
  546.          {
  547.              if (self.radsuit_finished > time)
  548. @@ -855,7 +879,7 @@
  549.          }
  550.      }
  551.      else if (self.watertype == CONTENT_SLIME)
  552. -    {    // do damage
  553. +    {       // do damage
  554.          if (self.dmgtime < time && self.radsuit_finished < time)
  555.          {
  556.              self.dmgtime = time + 1;
  557. @@ -864,7 +888,7 @@
  558.      }
  559.      
  560.      if ( !(self.flags & FL_INWATER) )
  561. -    {    
  562. +    {       
  563.  
  564.  // player enter water sound
  565.  
  566. @@ -896,17 +920,17 @@
  567.      end = start + v_forward*24;
  568.      traceline (start, end, TRUE, self);
  569.      if (trace_fraction < 1)
  570. -    {    // solid at waist
  571. +    {       // solid at waist
  572.          start_z = start_z + self.maxs_z - 8;
  573.          end = start + v_forward*24;
  574.          self.movedir = trace_plane_normal * -50;
  575.          traceline (start, end, TRUE, self);
  576.          if (trace_fraction == 1)
  577. -        {    // open at eye level
  578. +        {       // open at eye level
  579.              self.flags = self.flags | FL_WATERJUMP;
  580.              self.velocity_z = 225;
  581.              self.flags = self.flags - (self.flags & FL_JUMPRELEASED);
  582. -            self.teleport_time = time + 2;    // safety net
  583. +            self.teleport_time = time + 2;  // safety net
  584.              return;
  585.          }
  586.      }
  587. @@ -922,19 +946,43 @@
  588.  */
  589.  void() PlayerPreThink =
  590.  {
  591. -    local    float    mspeed, aspeed;
  592. -    local    float    r;
  593. +    local   float   mspeed, aspeed;
  594. +    local   float   r;
  595. +    local   float   c_ashley;  // a fat person
  596. +    local   string  fs;
  597.  
  598.      if (intermission_running)
  599.      {
  600. -        IntermissionThink ();    // otherwise a button could be missed between
  601. -        return;                    // the think tics
  602. +        IntermissionThink ();   // otherwise a button could be missed between
  603. +        return;                                 // the think tics
  604.      }
  605.  
  606.      if (self.view_ofs == '0 0 0')
  607. -        return;        // intermission or finale
  608. +        return;         // intermission or finale
  609. +
  610. +//CN_PATCH - Aug 96: Calculate restricted movement by weight of rockets
  611. +//                    and increased movement by health++
  612. +
  613. +    c_ashley = 0.5 + ((100 - self.ammo_rockets) * 0.005);
  614. +
  615. +    //Now check for health > 100 and give slight speed advantage
  616. +    if (self.health > 100)
  617. +    {
  618. +      c_ashley = c_ashley + ((self.health - 100) * 0.002);
  619. +      if (c_ashley > 1.0)
  620. +        c_ashley = 1.0;  //Normalise to 1 maximum
  621. +    }
  622. +
  623. +    self.velocity_x = self.velocity_x *  c_ashley;
  624. +    self.velocity_y = self.velocity_y *  c_ashley;
  625.  
  626. -    makevectors (self.v_angle);        // is this still used
  627. +    // don't fall down slower than normal
  628. +    if (self.velocity_z > 0)
  629. +      self.velocity_z = self.velocity_z *  c_ashley;
  630. +    self.avelocity = vectoangles(self.velocity);
  631. +//END CN_PATCH
  632. +
  633. +    makevectors (self.v_angle);             // is this still used
  634.  
  635.      CheckRules ();
  636.      WaterMove ();
  637. @@ -949,7 +997,7 @@
  638.      }
  639.      
  640.      if (self.deadflag == DEAD_DYING)
  641. -        return;    // dying, so do nothing
  642. +        return; // dying, so do nothing
  643.  
  644.      if (self.button2)
  645.      {
  646. @@ -958,7 +1006,7 @@
  647.      else
  648.          self.flags = self.flags | FL_JUMPRELEASED;
  649.  
  650. -// teleporters can force a non-moving pause time    
  651. +// teleporters can force a non-moving pause time        
  652.      if (time < self.pausetime)
  653.          self.velocity = '0 0 0';
  654.  };
  655. @@ -1004,7 +1052,7 @@
  656.          }
  657.  
  658.          if (self.invisible_finished < time)
  659. -        {    // just stopped
  660. +        {       // just stopped
  661.              self.items = self.items - IT_INVISIBILITY;
  662.              self.invisible_finished = 0;
  663.              self.invisible_time = 0;
  664. @@ -1015,7 +1063,7 @@
  665.          self.modelindex = modelindex_eyes;
  666.      }
  667.      else
  668. -        self.modelindex = modelindex_player;    // don't use eyes
  669. +        self.modelindex = modelindex_player;    // don't use eyes
  670.  
  671.  // invincibility
  672.      if (self.invincible_finished)
  673. @@ -1039,7 +1087,7 @@
  674.          }
  675.          
  676.          if (self.invincible_finished < time)
  677. -        {    // just stopped
  678. +        {       // just stopped
  679.              self.items = self.items - IT_INVULNERABILITY;
  680.              self.invincible_time = 0;
  681.              self.invincible_finished = 0;
  682. @@ -1064,7 +1112,7 @@
  683.                  stuffcmd (self, "bf\n");
  684.                  sound (self, CHAN_AUTO, "items/damage2.wav", 1, ATTN_NORM);
  685.                  self.super_time = time + 1;
  686. -            }      
  687. +            }         
  688.              
  689.              if (self.super_time < time)
  690.              {
  691. @@ -1074,7 +1122,7 @@
  692.          }
  693.  
  694.          if (self.super_damage_finished < time)
  695. -        {    // just stopped
  696. +        {       // just stopped
  697.              self.items = self.items - IT_QUAD;
  698.              self.super_damage_finished = 0;
  699.              self.super_time = 0;
  700. @@ -1083,12 +1131,12 @@
  701.              self.effects = self.effects | EF_DIMLIGHT;
  702.          else
  703.              self.effects = self.effects - (self.effects & EF_DIMLIGHT);
  704. -    }    
  705. +    }       
  706.  
  707. -// suit    
  708. +// suit 
  709.      if (self.radsuit_finished)
  710.      {
  711. -        self.air_finished = time + 12;        // don't drown
  712. +        self.air_finished = time + 12;          // don't drown
  713.  
  714.  // sound and screen flash when items starts to run out
  715.          if (self.radsuit_finished < time + 3)
  716. @@ -1109,12 +1157,12 @@
  717.          }
  718.  
  719.          if (self.radsuit_finished < time)
  720. -        {    // just stopped
  721. +        {       // just stopped
  722.              self.items = self.items - IT_SUIT;
  723.              self.rad_time = 0;
  724.              self.radsuit_finished = 0;
  725.          }
  726. -    }    
  727. +    }       
  728.  
  729.  };
  730.  
  731. @@ -1128,11 +1176,11 @@
  732.  */
  733.  void() PlayerPostThink =
  734.  {
  735. -    local    float    mspeed, aspeed;
  736. -    local    float    r;
  737. +    local   float   mspeed, aspeed;
  738. +    local   float   r;
  739.  
  740.      if (self.view_ofs == '0 0 0')
  741. -        return;        // intermission or finale
  742. +        return;         // intermission or finale
  743.      if (self.deadflag)
  744.          return;
  745.          
  746. @@ -1140,7 +1188,7 @@
  747.  
  748.      W_WeaponFrame ();
  749.  
  750. -// check to see if player landed and play landing sound    
  751. +// check to see if player landed and play landing sound 
  752.      if ((self.jump_flag < -300) && (self.flags & FL_ONGROUND) && (self.health > 0))
  753.      {
  754.          if (self.watertype == CONTENT_WATER)
  755. @@ -1173,6 +1221,7 @@
  756.  */
  757.  void() ClientConnect =
  758.  {
  759. +sprint (self, "Real Weapons Installed\n");
  760.      bprint (self.netname);
  761.      bprint (" entered the game\n");
  762.      
  763. @@ -1214,8 +1263,8 @@
  764.  */
  765.  void(entity targ, entity attacker) ClientObituary =
  766.  {
  767. -    local    float rnum;
  768. -    local    string deathstring, deathstring2;
  769. +    local   float rnum;
  770. +    local   string deathstring, deathstring2;
  771.      rnum = random();
  772.  
  773.      if (targ.classname == "player")
  774. @@ -1255,9 +1304,17 @@
  775.                      return;
  776.                  }
  777.                  if (targ.weapon == 16)
  778. +                  if (targ.jammed_death == 0)
  779.                      bprint (" tries to put the pin back in\n");
  780. +                  else
  781. +                    bprint ("'s Grenade Launcher explodes!\n");
  782.                  else if (rnum)
  783. +                {
  784. +                  if (targ.jammed_death == 0)
  785.                      bprint (" becomes bored with life\n");
  786. +                  else
  787. +                    bprint ("'s Rocket Launcher explodes!\n");
  788. +                }
  789.                  else
  790.                      bprint (" checks if his weapon is loaded\n");
  791.                  return;
  792. @@ -1329,7 +1386,7 @@
  793.          }
  794.          else
  795.          {
  796. -            targ.frags = targ.frags - 1;        // killed self
  797. +            targ.frags = targ.frags - 1;            // killed self
  798.              rnum = targ.watertype;
  799.  
  800.              bprint (targ.netname);
  801. @@ -1356,10 +1413,14 @@
  802.                      bprint (" burst into flames\n");
  803.                      return;
  804.                  }
  805. -                if (random() < 0.5)
  806. +                if (random() < 0.2)
  807. +                  if (random() < 0.6)
  808.                      bprint (" turned into hot slag\n");
  809. -                else
  810. +                  else
  811.                      bprint (" visits the Volcano God\n");
  812. +                else
  813. +                  bprint (" goes for a dip in the lava!\n");
  814. +
  815.                  return;
  816.              }
  817.  
  818. @@ -1406,7 +1467,7 @@
  819.                  return;
  820.              }
  821.              if (attacker.solid == SOLID_BSP && attacker != world)
  822. -            {    
  823. +            {       
  824.                  bprint (" was squished\n");
  825.                  return;
  826.              }
  827. diff -ur --new-file v101qc/defs.qc progs/defs.qc
  828. --- v101qc/defs.qc    Sun Aug 18 02:29:36 1996
  829. +++ progs/defs.qc    Sat Aug 17 21:54:02 1996
  830. @@ -10,13 +10,13 @@
  831.  //
  832.  // system globals
  833.  //
  834. -entity        self;
  835. -entity        other;
  836. -entity        world;
  837. -float        time;
  838. -float        frametime;
  839. +entity          self;
  840. +entity          other;
  841. +entity          world;
  842. +float           time;
  843. +float           frametime;
  844.  
  845. -float        force_retouch;        // force all entities to touch triggers
  846. +float           force_retouch;          // force all entities to touch triggers
  847.                                  // next frame.  this is needed because
  848.                                  // non-moving things don't normally scan
  849.                                  // for triggers, and when a trigger is
  850. @@ -24,69 +24,69 @@
  851.                                  // needs to catch everything.
  852.                                  // decremented each frame, so set to 2
  853.                                  // to guarantee everything is touched
  854. -string        mapname;
  855. +string          mapname;
  856.  
  857. -float        deathmatch;
  858. -float        coop;
  859. -float        teamplay;
  860. +float           deathmatch;
  861. +float           coop;
  862. +float           teamplay;
  863.  
  864. -float        serverflags;        // propagated from level to level, used to
  865. +float           serverflags;            // propagated from level to level, used to
  866.                                  // keep track of completed episodes
  867.  
  868. -float        total_secrets;
  869. -float        total_monsters;
  870. +float           total_secrets;
  871. +float           total_monsters;
  872.  
  873. -float        found_secrets;        // number of secrets found
  874. -float        killed_monsters;    // number of monsters killed
  875. +float           found_secrets;          // number of secrets found
  876. +float           killed_monsters;        // number of monsters killed
  877.  
  878.  
  879.  // spawnparms are used to encode information about clients across server
  880.  // level changes
  881. -float        parm1, parm2, parm3, parm4, parm5, parm6, parm7, parm8, parm9, parm10, parm11, parm12, parm13, parm14, parm15, parm16;
  882. +float           parm1, parm2, parm3, parm4, parm5, parm6, parm7, parm8, parm9, parm10, parm11, parm12, parm13, parm14, parm15, parm16;
  883.  
  884.  //
  885.  // global variables set by built in functions
  886. -//    
  887. -vector        v_forward, v_up, v_right;    // set by makevectors()
  888. +//      
  889. +vector          v_forward, v_up, v_right;       // set by makevectors()
  890.      
  891.  // set by traceline / tracebox
  892. -float        trace_allsolid;
  893. -float        trace_startsolid;
  894. -float        trace_fraction;
  895. -vector        trace_endpos;
  896. -vector        trace_plane_normal;
  897. -float        trace_plane_dist;
  898. -entity        trace_ent;
  899. -float        trace_inopen;
  900. -float        trace_inwater;
  901. +float           trace_allsolid;
  902. +float           trace_startsolid;
  903. +float           trace_fraction;
  904. +vector          trace_endpos;
  905. +vector          trace_plane_normal;
  906. +float           trace_plane_dist;
  907. +entity          trace_ent;
  908. +float           trace_inopen;
  909. +float           trace_inwater;
  910.  
  911. -entity        msg_entity;                // destination of single entity writes
  912. +entity          msg_entity;                             // destination of single entity writes
  913.  
  914.  //
  915.  // required prog functions
  916.  //
  917. -void()         main;                        // only for testing
  918. +void()          main;                                           // only for testing
  919.  
  920. -void()        StartFrame;
  921. +void()          StartFrame;
  922.  
  923. -void()         PlayerPreThink;
  924. -void()         PlayerPostThink;
  925. +void()          PlayerPreThink;
  926. +void()          PlayerPostThink;
  927.  
  928. -void()        ClientKill;
  929. -void()        ClientConnect;
  930. -void()         PutClientInServer;        // call after setting the parm1... parms
  931. -void()        ClientDisconnect;
  932. +void()          ClientKill;
  933. +void()          ClientConnect;
  934. +void()          PutClientInServer;              // call after setting the parm1... parms
  935. +void()          ClientDisconnect;
  936.  
  937. -void()        SetNewParms;            // called when a client first connects to
  938. +void()          SetNewParms;                    // called when a client first connects to
  939.                                      // a server. sets parms so they can be
  940.                                      // saved off for restarts
  941.  
  942. -void()        SetChangeParms;            // call to set parms for self so they can
  943. +void()          SetChangeParms;                 // call to set parms for self so they can
  944.                                      // be saved for a level transition
  945.  
  946.  
  947.  //================================================
  948. -void        end_sys_globals;        // flag for structure dumping
  949. +void            end_sys_globals;                // flag for structure dumping
  950.  //================================================
  951.  
  952.  /*
  953. @@ -100,115 +100,115 @@
  954.  //
  955.  // system fields (*** = do not set in prog code, maintained by C code)
  956.  //
  957. -.float        modelindex;        // *** model index in the precached list
  958. -.vector        absmin, absmax;    // *** origin + mins / maxs
  959. +.float          modelindex;             // *** model index in the precached list
  960. +.vector         absmin, absmax; // *** origin + mins / maxs
  961.  
  962. -.float        ltime;            // local time for entity
  963. -.float        movetype;
  964. -.float        solid;
  965. -
  966. -.vector        origin;            // ***
  967. -.vector        oldorigin;        // ***
  968. -.vector        velocity;
  969. -.vector        angles;
  970. -.vector        avelocity;
  971. -
  972. -.vector        punchangle;        // temp angle adjust from damage or recoil
  973. -
  974. -.string        classname;        // spawn function
  975. -.string        model;
  976. -.float        frame;
  977. -.float        skin;
  978. -.float        effects;
  979. -
  980. -.vector        mins, maxs;        // bounding box extents reletive to origin
  981. -.vector        size;            // maxs - mins
  982. -
  983. -.void()        touch;
  984. -.void()        use;
  985. -.void()        think;
  986. -.void()        blocked;        // for doors or plats, called when can't push other
  987. +.float          ltime;                  // local time for entity
  988. +.float          movetype;
  989. +.float          solid;
  990. +
  991. +.vector         origin;                 // ***
  992. +.vector         oldorigin;              // ***
  993. +.vector         velocity;
  994. +.vector         angles;
  995. +.vector         avelocity;
  996. +
  997. +.vector         punchangle;             // temp angle adjust from damage or recoil
  998. +
  999. +.string         classname;              // spawn function
  1000. +.string         model;
  1001. +.float          frame;
  1002. +.float          skin;
  1003. +.float          effects;
  1004. +
  1005. +.vector         mins, maxs;             // bounding box extents reletive to origin
  1006. +.vector         size;                   // maxs - mins
  1007. +
  1008. +.void()         touch;
  1009. +.void()         use;
  1010. +.void()         think;
  1011. +.void()         blocked;                // for doors or plats, called when can't push other
  1012.  
  1013. -.float        nextthink;
  1014. -.entity        groundentity;
  1015. +.float          nextthink;
  1016. +.entity         groundentity;
  1017.  
  1018.  // stats
  1019. -.float        health;
  1020. -.float        frags;
  1021. -.float        weapon;            // one of the IT_SHOTGUN, etc flags
  1022. -.string        weaponmodel;
  1023. -.float        weaponframe;
  1024. -.float        currentammo;
  1025. -.float        ammo_shells, ammo_nails, ammo_rockets, ammo_cells;
  1026. +.float          health;
  1027. +.float          frags;
  1028. +.float          weapon;                 // one of the IT_SHOTGUN, etc flags
  1029. +.string         weaponmodel;
  1030. +.float          weaponframe;
  1031. +.float          currentammo;
  1032. +.float          ammo_shells, ammo_nails, ammo_rockets, ammo_cells;
  1033.  
  1034. -.float        items;            // bit flags
  1035. +.float          items;                  // bit flags
  1036.  
  1037. -.float        takedamage;
  1038. -.entity        chain;
  1039. -.float        deadflag;
  1040. +.float          takedamage;
  1041. +.entity         chain;
  1042. +.float          deadflag;
  1043.  
  1044. -.vector        view_ofs;            // add to origin to get eye point
  1045. +.vector         view_ofs;                       // add to origin to get eye point
  1046.  
  1047.  
  1048. -.float        button0;        // fire
  1049. -.float        button1;        // use
  1050. -.float        button2;        // jump
  1051. +.float          button0;                // fire
  1052. +.float          button1;                // use
  1053. +.float          button2;                // jump
  1054.  
  1055. -.float        impulse;        // weapon changes
  1056. +.float          impulse;                // weapon changes
  1057.  
  1058. -.float        fixangle;
  1059. -.vector        v_angle;        // view / targeting angle for players
  1060. -.float        idealpitch;        // calculated pitch angle for lookup up slopes
  1061. +.float          fixangle;
  1062. +.vector         v_angle;                // view / targeting angle for players
  1063. +.float          idealpitch;             // calculated pitch angle for lookup up slopes
  1064.  
  1065.  
  1066. -.string        netname;
  1067. +.string         netname;
  1068.  
  1069. -.entity     enemy;
  1070. +.entity         enemy;
  1071.  
  1072. -.float        flags;
  1073. +.float          flags;
  1074.  
  1075. -.float        colormap;
  1076. -.float        team;
  1077. +.float          colormap;
  1078. +.float          team;
  1079.  
  1080. -.float        max_health;        // players maximum health is stored here
  1081. +.float          max_health;             // players maximum health is stored here
  1082.  
  1083. -.float        teleport_time;    // don't back up
  1084. +.float          teleport_time;  // don't back up
  1085.  
  1086. -.float        armortype;        // save this fraction of incoming damage
  1087. -.float        armorvalue;
  1088. +.float          armortype;              // save this fraction of incoming damage
  1089. +.float          armorvalue;
  1090.  
  1091. -.float        waterlevel;        // 0 = not in, 1 = feet, 2 = wast, 3 = eyes
  1092. -.float        watertype;        // a contents value
  1093. +.float          waterlevel;             // 0 = not in, 1 = feet, 2 = wast, 3 = eyes
  1094. +.float          watertype;              // a contents value
  1095.  
  1096. -.float        ideal_yaw;
  1097. -.float        yaw_speed;
  1098. +.float          ideal_yaw;
  1099. +.float          yaw_speed;
  1100.  
  1101. -.entity        aiment;
  1102. +.entity         aiment;
  1103.  
  1104. -.entity     goalentity;        // a movetarget or an enemy
  1105. +.entity         goalentity;             // a movetarget or an enemy
  1106.  
  1107. -.float        spawnflags;
  1108. +.float          spawnflags;
  1109.  
  1110. -.string        target;
  1111. -.string        targetname;
  1112. +.string         target;
  1113. +.string         targetname;
  1114.  
  1115.  // damage is accumulated through a frame. and sent as one single
  1116.  // message, so the super shotgun doesn't generate huge messages
  1117. -.float        dmg_take;
  1118. -.float        dmg_save;
  1119. -.entity        dmg_inflictor;
  1120. +.float          dmg_take;
  1121. +.float          dmg_save;
  1122. +.entity         dmg_inflictor;
  1123.  
  1124. -.entity        owner;        // who launched a missile
  1125. -.vector        movedir;    // mostly for doors, but also used for waterjump
  1126. +.entity         owner;          // who launched a missile
  1127. +.vector         movedir;        // mostly for doors, but also used for waterjump
  1128.  
  1129. -.string        message;        // trigger messages
  1130. +.string         message;                // trigger messages
  1131.  
  1132. -.float        sounds;        // either a cd track number or sound number
  1133. +.float          sounds;         // either a cd track number or sound number
  1134.  
  1135. -.string        noise, noise1, noise2, noise3;    // contains names of wavs to play
  1136. +.string         noise, noise1, noise2, noise3;  // contains names of wavs to play
  1137.  
  1138.  //================================================
  1139. -void        end_sys_fields;            // flag for structure dumping
  1140. +void            end_sys_fields;                 // flag for structure dumping
  1141.  //================================================
  1142.  
  1143.  /*
  1144. @@ -224,330 +224,351 @@
  1145.  // constants
  1146.  //
  1147.  
  1148. -float    FALSE                    = 0;
  1149. -float     TRUE                    = 1;
  1150. +float   FALSE                                   = 0;
  1151. +float   TRUE                                    = 1;
  1152.  
  1153.  // edict.flags
  1154. -float    FL_FLY                    = 1;
  1155. -float    FL_SWIM                    = 2;
  1156. -float    FL_CLIENT                = 8;    // set for all client edicts
  1157. -float    FL_INWATER                = 16;    // for enter / leave water splash
  1158. -float    FL_MONSTER                = 32;
  1159. -float    FL_GODMODE                = 64;    // player cheat
  1160. -float    FL_NOTARGET                = 128;    // player cheat
  1161. -float    FL_ITEM                    = 256;    // extra wide size for bonus items
  1162. -float    FL_ONGROUND                = 512;    // standing on something
  1163. -float    FL_PARTIALGROUND        = 1024;    // not all corners are valid
  1164. -float    FL_WATERJUMP            = 2048;    // player jumping out of water
  1165. -float    FL_JUMPRELEASED            = 4096;    // for jump debouncing
  1166. +float   FL_FLY                                  = 1;
  1167. +float   FL_SWIM                                 = 2;
  1168. +float   FL_CLIENT                               = 8;    // set for all client edicts
  1169. +float   FL_INWATER                              = 16;   // for enter / leave water splash
  1170. +float   FL_MONSTER                              = 32;
  1171. +float   FL_GODMODE                              = 64;   // player cheat
  1172. +float   FL_NOTARGET                             = 128;  // player cheat
  1173. +float   FL_ITEM                                 = 256;  // extra wide size for bonus items
  1174. +float   FL_ONGROUND                             = 512;  // standing on something
  1175. +float   FL_PARTIALGROUND                = 1024; // not all corners are valid
  1176. +float   FL_WATERJUMP                    = 2048; // player jumping out of water
  1177. +float   FL_JUMPRELEASED                 = 4096; // for jump debouncing
  1178.  
  1179.  // edict.movetype values
  1180. -float    MOVETYPE_NONE            = 0;    // never moves
  1181. -//float    MOVETYPE_ANGLENOCLIP    = 1;
  1182. -//float    MOVETYPE_ANGLECLIP        = 2;
  1183. -float    MOVETYPE_WALK            = 3;    // players only
  1184. -float    MOVETYPE_STEP            = 4;    // discrete, not real time unless fall
  1185. -float    MOVETYPE_FLY            = 5;
  1186. -float    MOVETYPE_TOSS            = 6;    // gravity
  1187. -float    MOVETYPE_PUSH            = 7;    // no clip to world, push and crush
  1188. -float    MOVETYPE_NOCLIP            = 8;
  1189. -float    MOVETYPE_FLYMISSILE        = 9;    // fly with extra size against monsters
  1190. -float    MOVETYPE_BOUNCE            = 10;
  1191. -float    MOVETYPE_BOUNCEMISSILE    = 11;    // bounce with extra size
  1192. +float   MOVETYPE_NONE                   = 0;    // never moves
  1193. +//float MOVETYPE_ANGLENOCLIP    = 1;
  1194. +//float MOVETYPE_ANGLECLIP              = 2;
  1195. +float   MOVETYPE_WALK                   = 3;    // players only
  1196. +float   MOVETYPE_STEP                   = 4;    // discrete, not real time unless fall
  1197. +float   MOVETYPE_FLY                    = 5;
  1198. +float   MOVETYPE_TOSS                   = 6;    // gravity
  1199. +float   MOVETYPE_PUSH                   = 7;    // no clip to world, push and crush
  1200. +float   MOVETYPE_NOCLIP                 = 8;
  1201. +float   MOVETYPE_FLYMISSILE             = 9;    // fly with extra size against monsters
  1202. +float   MOVETYPE_BOUNCE                 = 10;
  1203. +float   MOVETYPE_BOUNCEMISSILE  = 11;   // bounce with extra size
  1204.  
  1205.  // edict.solid values
  1206. -float    SOLID_NOT                = 0;    // no interaction with other objects
  1207. -float    SOLID_TRIGGER            = 1;    // touch on edge, but not blocking
  1208. -float    SOLID_BBOX                = 2;    // touch on edge, block
  1209. -float    SOLID_SLIDEBOX            = 3;    // touch on edge, but not an onground
  1210. -float    SOLID_BSP                = 4;    // bsp clip, touch on edge, block
  1211. +float   SOLID_NOT                               = 0;    // no interaction with other objects
  1212. +float   SOLID_TRIGGER                   = 1;    // touch on edge, but not blocking
  1213. +float   SOLID_BBOX                              = 2;    // touch on edge, block
  1214. +float   SOLID_SLIDEBOX                  = 3;    // touch on edge, but not an onground
  1215. +float   SOLID_BSP                               = 4;    // bsp clip, touch on edge, block
  1216.  
  1217.  // range values
  1218. -float    RANGE_MELEE                = 0;
  1219. -float    RANGE_NEAR                = 1;
  1220. -float    RANGE_MID                = 2;
  1221. -float    RANGE_FAR                = 3;
  1222. +float   RANGE_MELEE                             = 0;
  1223. +float   RANGE_NEAR                              = 1;
  1224. +float   RANGE_MID                               = 2;
  1225. +float   RANGE_FAR                               = 3;
  1226.  
  1227.  // deadflag values
  1228.  
  1229. -float    DEAD_NO                    = 0;
  1230. -float    DEAD_DYING                = 1;
  1231. -float    DEAD_DEAD                = 2;
  1232. -float    DEAD_RESPAWNABLE        = 3;
  1233. +float   DEAD_NO                                 = 0;
  1234. +float   DEAD_DYING                              = 1;
  1235. +float   DEAD_DEAD                               = 2;
  1236. +float   DEAD_RESPAWNABLE                = 3;
  1237.  
  1238.  // takedamage values
  1239.  
  1240. -float    DAMAGE_NO                = 0;
  1241. -float    DAMAGE_YES                = 1;
  1242. -float    DAMAGE_AIM                = 2;
  1243. +float   DAMAGE_NO                               = 0;
  1244. +float   DAMAGE_YES                              = 1;
  1245. +float   DAMAGE_AIM                              = 2;
  1246.  
  1247.  // items
  1248. -float    IT_AXE                    = 4096;
  1249. -float    IT_SHOTGUN                = 1;
  1250. -float    IT_SUPER_SHOTGUN        = 2;
  1251. -float    IT_NAILGUN                = 4;
  1252. -float    IT_SUPER_NAILGUN        = 8;
  1253. -float    IT_GRENADE_LAUNCHER        = 16;
  1254. -float    IT_ROCKET_LAUNCHER        = 32;
  1255. -float    IT_LIGHTNING            = 64;
  1256. -float    IT_EXTRA_WEAPON            = 128;
  1257. -
  1258. -float    IT_SHELLS                = 256;
  1259. -float    IT_NAILS                = 512;
  1260. -float    IT_ROCKETS                = 1024;
  1261. -float    IT_CELLS                = 2048;
  1262. -
  1263. -float    IT_ARMOR1                = 8192;
  1264. -float    IT_ARMOR2                = 16384;
  1265. -float    IT_ARMOR3                = 32768;
  1266. -float    IT_SUPERHEALTH            = 65536;
  1267. -
  1268. -float    IT_KEY1                    = 131072;
  1269. -float    IT_KEY2                    = 262144;
  1270. -
  1271. -float    IT_INVISIBILITY            = 524288;
  1272. -float    IT_INVULNERABILITY        = 1048576;
  1273. -float    IT_SUIT                    = 2097152;
  1274. -float    IT_QUAD                    = 4194304;
  1275. +float   IT_AXE                                  = 4096;
  1276. +float   IT_SHOTGUN                              = 1;
  1277. +float   IT_SUPER_SHOTGUN                = 2;
  1278. +float   IT_NAILGUN                              = 4;
  1279. +float   IT_SUPER_NAILGUN                = 8;
  1280. +float   IT_GRENADE_LAUNCHER             = 16;
  1281. +float   IT_ROCKET_LAUNCHER              = 32;
  1282. +float   IT_LIGHTNING                    = 64;
  1283. +float   IT_EXTRA_WEAPON                 = 128;
  1284. +
  1285. +float   IT_SHELLS                               = 256;
  1286. +float   IT_NAILS                                = 512;
  1287. +float   IT_ROCKETS                              = 1024;
  1288. +float   IT_CELLS                                = 2048;
  1289. +
  1290. +float   IT_ARMOR1                               = 8192;
  1291. +float   IT_ARMOR2                               = 16384;
  1292. +float   IT_ARMOR3                               = 32768;
  1293. +float   IT_SUPERHEALTH                  = 65536;
  1294. +
  1295. +float   IT_KEY1                                 = 131072;
  1296. +float   IT_KEY2                                 = 262144;
  1297. +
  1298. +float   IT_INVISIBILITY                 = 524288;
  1299. +float   IT_INVULNERABILITY              = 1048576;
  1300. +float   IT_SUIT                                 = 2097152;
  1301. +float   IT_QUAD                                 = 4194304;
  1302.  
  1303.  // point content values
  1304.  
  1305. -float    CONTENT_EMPTY            = -1;
  1306. -float    CONTENT_SOLID            = -2;
  1307. -float    CONTENT_WATER            = -3;
  1308. -float    CONTENT_SLIME            = -4;
  1309. -float    CONTENT_LAVA            = -5;
  1310. -float    CONTENT_SKY                = -6;
  1311. -
  1312. -float    STATE_TOP        = 0;
  1313. -float    STATE_BOTTOM    = 1;
  1314. -float    STATE_UP        = 2;
  1315. -float    STATE_DOWN        = 3;
  1316. -
  1317. -vector    VEC_ORIGIN = '0 0 0';
  1318. -vector    VEC_HULL_MIN = '-16 -16 -24';
  1319. -vector    VEC_HULL_MAX = '16 16 32';
  1320. +float   CONTENT_EMPTY                   = -1;
  1321. +float   CONTENT_SOLID                   = -2;
  1322. +float   CONTENT_WATER                   = -3;
  1323. +float   CONTENT_SLIME                   = -4;
  1324. +float   CONTENT_LAVA                    = -5;
  1325. +float   CONTENT_SKY                             = -6;
  1326. +
  1327. +float   STATE_TOP               = 0;
  1328. +float   STATE_BOTTOM    = 1;
  1329. +float   STATE_UP                = 2;
  1330. +float   STATE_DOWN              = 3;
  1331. +
  1332. +vector  VEC_ORIGIN = '0 0 0';
  1333. +vector  VEC_HULL_MIN = '-16 -16 -24';
  1334. +vector  VEC_HULL_MAX = '16 16 32';
  1335.  
  1336. -vector    VEC_HULL2_MIN = '-32 -32 -24';
  1337. -vector    VEC_HULL2_MAX = '32 32 64';
  1338. +vector  VEC_HULL2_MIN = '-32 -32 -24';
  1339. +vector  VEC_HULL2_MAX = '32 32 64';
  1340.  
  1341.  // protocol bytes
  1342. -float    SVC_TEMPENTITY        = 23;
  1343. -float    SVC_KILLEDMONSTER    = 27;
  1344. -float    SVC_FOUNDSECRET        = 28;
  1345. -float    SVC_INTERMISSION    = 30;
  1346. -float    SVC_FINALE            = 31;
  1347. -float    SVC_CDTRACK            = 32;
  1348. -float    SVC_SELLSCREEN        = 33;
  1349. -
  1350. -
  1351. -float    TE_SPIKE        = 0;
  1352. -float    TE_SUPERSPIKE    = 1;
  1353. -float    TE_GUNSHOT        = 2;
  1354. -float    TE_EXPLOSION    = 3;
  1355. -float    TE_TAREXPLOSION    = 4;
  1356. -float    TE_LIGHTNING1    = 5;
  1357. -float    TE_LIGHTNING2    = 6;
  1358. -float    TE_WIZSPIKE        = 7;
  1359. -float    TE_KNIGHTSPIKE    = 8;
  1360. -float    TE_LIGHTNING3    = 9;
  1361. -float    TE_LAVASPLASH    = 10;
  1362. -float    TE_TELEPORT        = 11;
  1363. +float   SVC_TEMPENTITY          = 23;
  1364. +float   SVC_KILLEDMONSTER       = 27;
  1365. +float   SVC_FOUNDSECRET         = 28;
  1366. +float   SVC_INTERMISSION        = 30;
  1367. +float   SVC_FINALE                      = 31;
  1368. +float   SVC_CDTRACK                     = 32;
  1369. +float   SVC_SELLSCREEN          = 33;
  1370. +
  1371. +
  1372. +float   TE_SPIKE                = 0;
  1373. +float   TE_SUPERSPIKE   = 1;
  1374. +float   TE_GUNSHOT              = 2;
  1375. +float   TE_EXPLOSION    = 3;
  1376. +float   TE_TAREXPLOSION = 4;
  1377. +float   TE_LIGHTNING1   = 5;
  1378. +float   TE_LIGHTNING2   = 6;
  1379. +float   TE_WIZSPIKE             = 7;
  1380. +float   TE_KNIGHTSPIKE  = 8;
  1381. +float   TE_LIGHTNING3   = 9;
  1382. +float   TE_LAVASPLASH   = 10;
  1383. +float   TE_TELEPORT             = 11;
  1384.  
  1385.  // sound channels
  1386.  // channel 0 never willingly overrides
  1387.  // other channels (1-7) allways override a playing sound on that channel
  1388. -float    CHAN_AUTO        = 0;
  1389. -float    CHAN_WEAPON        = 1;
  1390. -float    CHAN_VOICE        = 2;
  1391. -float    CHAN_ITEM        = 3;
  1392. -float    CHAN_BODY        = 4;
  1393. -
  1394. -float    ATTN_NONE        = 0;
  1395. -float    ATTN_NORM        = 1;
  1396. -float    ATTN_IDLE        = 2;
  1397. -float    ATTN_STATIC        = 3;
  1398. +float   CHAN_AUTO               = 0;
  1399. +float   CHAN_WEAPON             = 1;
  1400. +float   CHAN_VOICE              = 2;
  1401. +float   CHAN_ITEM               = 3;
  1402. +float   CHAN_BODY               = 4;
  1403. +
  1404. +float   ATTN_NONE               = 0;
  1405. +float   ATTN_NORM               = 1;
  1406. +float   ATTN_IDLE               = 2;
  1407. +float   ATTN_STATIC             = 3;
  1408.  
  1409.  // update types
  1410.  
  1411. -float    UPDATE_GENERAL    = 0;
  1412. -float    UPDATE_STATIC    = 1;
  1413. -float    UPDATE_BINARY    = 2;
  1414. -float    UPDATE_TEMP        = 3;
  1415. +float   UPDATE_GENERAL  = 0;
  1416. +float   UPDATE_STATIC   = 1;
  1417. +float   UPDATE_BINARY   = 2;
  1418. +float   UPDATE_TEMP             = 3;
  1419.  
  1420.  // entity effects
  1421.  
  1422. -float    EF_BRIGHTFIELD    = 1;
  1423. -float    EF_MUZZLEFLASH     = 2;
  1424. -float    EF_BRIGHTLIGHT     = 4;
  1425. -float    EF_DIMLIGHT     = 8;
  1426. +float   EF_BRIGHTFIELD  = 1;
  1427. +float   EF_MUZZLEFLASH  = 2;
  1428. +float   EF_BRIGHTLIGHT  = 4;
  1429. +float   EF_DIMLIGHT     = 8;
  1430.  
  1431.  
  1432.  // messages
  1433. -float    MSG_BROADCAST    = 0;        // unreliable to all
  1434. -float    MSG_ONE            = 1;        // reliable to one (msg_entity)
  1435. -float    MSG_ALL            = 2;        // reliable to all
  1436. -float    MSG_INIT        = 3;        // write to the init string
  1437. +float   MSG_BROADCAST   = 0;            // unreliable to all
  1438. +float   MSG_ONE                 = 1;            // reliable to one (msg_entity)
  1439. +float   MSG_ALL                 = 2;            // reliable to all
  1440. +float   MSG_INIT                = 3;            // write to the init string
  1441.  
  1442.  //================================================
  1443.  
  1444.  //
  1445.  // globals
  1446.  //
  1447. -float    movedist;
  1448. -float    gameover;        // set when a rule exits
  1449. +float   movedist;
  1450. +float   gameover;               // set when a rule exits
  1451.  
  1452. -string    string_null;    // null string, nothing should be held here
  1453. -float    empty_float;
  1454. +string  string_null;    // null string, nothing should be held here
  1455. +float   empty_float;
  1456.  
  1457. -entity    newmis;            // launch_spike sets this after spawning it
  1458. +entity  newmis;                 // launch_spike sets this after spawning it
  1459.  
  1460. -entity    activator;        // the entity that activated a trigger or brush
  1461. +entity  activator;              // the entity that activated a trigger or brush
  1462.  
  1463. -entity    damage_attacker;    // set by T_Damage
  1464. -float    framecount;
  1465. +entity  damage_attacker;        // set by T_Damage
  1466. +float   framecount;
  1467.  
  1468. -float        skill;
  1469. +float           skill;
  1470.  
  1471.  //================================================
  1472.  
  1473.  //
  1474.  // world fields (FIXME: make globals)
  1475.  //
  1476. -.string        wad;
  1477. -.string     map;
  1478. -.float        worldtype;    // 0=medieval 1=metal 2=base
  1479. +.string         wad;
  1480. +.string         map;
  1481. +.float          worldtype;      // 0=medieval 1=metal 2=base
  1482.  
  1483.  //================================================
  1484.  
  1485. -.string        killtarget;
  1486. +.string         killtarget;
  1487.  
  1488.  //
  1489.  // quakeed fields
  1490.  //
  1491. -.float        light_lev;        // not used by game, but parsed by light util
  1492. -.float        style;
  1493. +.float          light_lev;              // not used by game, but parsed by light util
  1494. +.float          style;
  1495.  
  1496.  
  1497.  //
  1498.  // monster ai
  1499.  //
  1500. -.void()        th_stand;
  1501. -.void()        th_walk;
  1502. -.void()        th_run;
  1503. -.void()        th_missile;
  1504. -.void()        th_melee;
  1505. -.void(entity attacker, float damage)        th_pain;
  1506. -.void()        th_die;
  1507. -
  1508. -.entity        oldenemy;        // mad at this player before taking damage
  1509. -
  1510. -.float        speed;
  1511. -
  1512. -.float    lefty;
  1513. -
  1514. -.float    search_time;
  1515. -.float    attack_state;
  1516. -
  1517. -float    AS_STRAIGHT        = 1;
  1518. -float    AS_SLIDING        = 2;
  1519. -float    AS_MELEE        = 3;
  1520. -float    AS_MISSILE        = 4;
  1521. +.void()         th_stand;
  1522. +.void()         th_walk;
  1523. +.void()         th_run;
  1524. +.void()         th_missile;
  1525. +.void()         th_melee;
  1526. +.void(entity attacker, float damage)            th_pain;
  1527. +.void()         th_die;
  1528. +
  1529. +.entity         oldenemy;               // mad at this player before taking damage
  1530. +
  1531. +.float          speed;
  1532. +
  1533. +.float  lefty;
  1534. +
  1535. +.float  search_time;
  1536. +.float  attack_state;
  1537. +
  1538. +float   AS_STRAIGHT             = 1;
  1539. +float   AS_SLIDING              = 2;
  1540. +float   AS_MELEE                = 3;
  1541. +float   AS_MISSILE              = 4;
  1542.  
  1543.  //
  1544.  // player only fields
  1545.  //
  1546. -.float        walkframe;
  1547. +.float          walkframe;
  1548.  
  1549. -.float         attack_finished;
  1550. -.float        pain_finished;
  1551. +.float          attack_finished;
  1552. +.float          pain_finished;
  1553.  
  1554. -.float        invincible_finished;
  1555. -.float        invisible_finished;
  1556. -.float        super_damage_finished;
  1557. -.float        radsuit_finished;
  1558. +//CN_PATCH - Cameron Newham, Aug 96
  1559. +.float          duration;  // duration of rocket existance
  1560. +.float          use_counter_shot;  //should really collapse these into one set
  1561. +.float          use_av_shot;
  1562. +.float          use_last_shot;
  1563. +.float          jammed_shot;
  1564. +.float          use_counter_rocket;
  1565. +.float          use_av_rocket;
  1566. +.float          use_last_rocket;
  1567. +.float          jammed_rocket;
  1568. +.float          use_counter_gl;
  1569. +.float          use_av_gl;
  1570. +.float          use_last_gl;
  1571. +.float          jammed_gl;
  1572. +.float          use_counter_ss;
  1573. +.float          use_av_ss;
  1574. +.float          use_last_ss;
  1575. +.float          jammed_ss;
  1576. +.float          jammed_death; //0 = none  1 = gl  2 = rl
  1577. +//END CN_PATCH
  1578. +
  1579. +.float          invincible_finished;
  1580. +.float          invisible_finished;
  1581. +.float          super_damage_finished;
  1582. +.float          radsuit_finished;
  1583. +
  1584. +.float          invincible_time, invincible_sound;
  1585. +.float          invisible_time, invisible_sound;
  1586. +.float          super_time, super_sound;
  1587. +.float          rad_time;
  1588. +.float          fly_sound;
  1589.  
  1590. -.float        invincible_time, invincible_sound;
  1591. -.float        invisible_time, invisible_sound;
  1592. -.float        super_time, super_sound;
  1593. -.float        rad_time;
  1594. -.float        fly_sound;
  1595. +.float          axhitme;
  1596.  
  1597. -.float        axhitme;
  1598. -
  1599. -.float        show_hostile;    // set to time+0.2 whenever a client fires a
  1600. +.float          show_hostile;   // set to time+0.2 whenever a client fires a
  1601.                              // weapon or takes damage.  Used to alert
  1602.                              // monsters that otherwise would let the player go
  1603. -.float        jump_flag;        // player jump flag
  1604. -.float        swim_flag;        // player swimming sound flag
  1605. -.float        air_finished;    // when time > air_finished, start drowning
  1606. -.float        bubble_count;    // keeps track of the number of bubbles
  1607. -.string        deathtype;        // keeps track of how the player died
  1608. +.float          jump_flag;              // player jump flag
  1609. +.float          swim_flag;              // player swimming sound flag
  1610. +.float          air_finished;   // when time > air_finished, start drowning
  1611. +.float          bubble_count;   // keeps track of the number of bubbles
  1612. +.string         deathtype;              // keeps track of how the player died
  1613.  
  1614.  //
  1615.  // object stuff
  1616.  //
  1617. -.string        mdl;
  1618. -.vector        mangle;            // angle at start
  1619. +.string         mdl;
  1620. +.vector         mangle;                 // angle at start
  1621.  
  1622. -.vector        oldorigin;        // only used by secret door
  1623. +.vector         oldorigin;              // only used by secret door
  1624.  
  1625. -.float        t_length, t_width;
  1626. +.float          t_length, t_width;
  1627.  
  1628.  
  1629.  //
  1630.  // doors, etc
  1631.  //
  1632. -.vector        dest, dest1, dest2;
  1633. -.float        wait;            // time from firing to restarting
  1634. -.float        delay;            // time from activation to firing
  1635. -.entity        trigger_field;    // door's trigger entity
  1636. -.string        noise4;
  1637. +.vector         dest, dest1, dest2;
  1638. +.float          wait;                   // time from firing to restarting
  1639. +.float          delay;                  // time from activation to firing
  1640. +.entity         trigger_field;  // door's trigger entity
  1641. +.string         noise4;
  1642.  
  1643.  //
  1644.  // monsters
  1645.  //
  1646. -.float         pausetime;
  1647. -.entity     movetarget;
  1648. +.float          pausetime;
  1649. +.entity         movetarget;
  1650.  
  1651.  
  1652.  //
  1653.  // doors
  1654.  //
  1655. -.float        aflag;
  1656. -.float        dmg;            // damage done by door when hit
  1657. +.float          aflag;
  1658. +.float          dmg;                    // damage done by door when hit
  1659.      
  1660.  //
  1661.  // misc
  1662.  //
  1663. -.float        cnt;             // misc flag
  1664. +.float          cnt;                    // misc flag
  1665.      
  1666.  //
  1667.  // subs
  1668.  //
  1669. -.void()        think1;
  1670. -.vector        finaldest, finalangle;
  1671. +.void()         think1;
  1672. +.vector         finaldest, finalangle;
  1673.  
  1674.  //
  1675.  // triggers
  1676.  //
  1677. -.float        count;            // for counting triggers
  1678. +.float          count;                  // for counting triggers
  1679.  
  1680.  
  1681.  //
  1682.  // plats / doors / buttons
  1683.  //
  1684. -.float        lip;
  1685. -.float        state;
  1686. -.vector        pos1, pos2;        // top and bottom positions
  1687. -.float        height;
  1688. +.float          lip;
  1689. +.float          state;
  1690. +.vector         pos1, pos2;             // top and bottom positions
  1691. +.float          height;
  1692.  
  1693.  //
  1694.  // sounds
  1695.  //
  1696. -.float        waitmin, waitmax;
  1697. -.float        distance;
  1698. -.float        volume;
  1699. +.float          waitmin, waitmax;
  1700. +.float          distance;
  1701. +.float          volume;
  1702.  
  1703.  
  1704.  
  1705. @@ -559,110 +580,110 @@
  1706.  // builtin functions
  1707.  //
  1708.  
  1709. -void(vector ang)    makevectors        = #1;        // sets v_forward, etc globals
  1710. -void(entity e, vector o) setorigin    = #2;
  1711. -void(entity e, string m) setmodel    = #3;        // set movetype and solid first
  1712. +void(vector ang)        makevectors             = #1;           // sets v_forward, etc globals
  1713. +void(entity e, vector o) setorigin      = #2;
  1714. +void(entity e, string m) setmodel       = #3;           // set movetype and solid first
  1715.  void(entity e, vector min, vector max) setsize = #4;
  1716.  // #5 was removed
  1717. -void() break                        = #6;
  1718. -float() random                        = #7;        // returns 0 - 1
  1719. +void() break                                            = #6;
  1720. +float() random                                          = #7;           // returns 0 - 1
  1721.  void(entity e, float chan, string samp, float vol, float atten) sound = #8;
  1722. -vector(vector v) normalize            = #9;
  1723. -void(string e) error                = #10;
  1724. -void(string e) objerror                = #11;
  1725. -float(vector v) vlen                = #12;
  1726. -float(vector v) vectoyaw            = #13;
  1727. -entity() spawn                        = #14;
  1728. -void(entity e) remove                = #15;
  1729. +vector(vector v) normalize                      = #9;
  1730. +void(string e) error                            = #10;
  1731. +void(string e) objerror                         = #11;
  1732. +float(vector v) vlen                            = #12;
  1733. +float(vector v) vectoyaw                        = #13;
  1734. +entity() spawn                                          = #14;
  1735. +void(entity e) remove                           = #15;
  1736.  
  1737.  // sets trace_* globals
  1738.  // nomonsters can be:
  1739.  // An entity will also be ignored for testing if forent == test,
  1740.  // forent->owner == test, or test->owner == forent
  1741.  // a forent of world is ignored
  1742. -void(vector v1, vector v2, float nomonsters, entity forent) traceline = #16;    
  1743. +void(vector v1, vector v2, float nomonsters, entity forent) traceline = #16;    
  1744.  
  1745. -entity() checkclient                = #17;    // returns a client to look for
  1746. +entity() checkclient                            = #17;  // returns a client to look for
  1747.  entity(entity start, .string fld, string match) find = #18;
  1748. -string(string s) precache_sound        = #19;
  1749. -string(string s) precache_model        = #20;
  1750. +string(string s) precache_sound         = #19;
  1751. +string(string s) precache_model         = #20;
  1752.  void(entity client, string s)stuffcmd = #21;
  1753.  entity(vector org, float rad) findradius = #22;
  1754. -void(string s) bprint                = #23;
  1755. +void(string s) bprint                           = #23;
  1756.  void(entity client, string s) sprint = #24;
  1757. -void(string s) dprint                = #25;
  1758. -string(float f) ftos                = #26;
  1759. -string(vector v) vtos                = #27;
  1760. -void() coredump                        = #28;        // prints all edicts
  1761. -void() traceon                        = #29;        // turns statment trace on
  1762. -void() traceoff                        = #30;
  1763. -void(entity e) eprint                = #31;        // prints an entire edict
  1764. -float(float yaw, float dist) walkmove    = #32;    // returns TRUE or FALSE
  1765. +void(string s) dprint                           = #25;
  1766. +string(float f) ftos                            = #26;
  1767. +string(vector v) vtos                           = #27;
  1768. +void() coredump                                         = #28;          // prints all edicts
  1769. +void() traceon                                          = #29;          // turns statment trace on
  1770. +void() traceoff                                         = #30;
  1771. +void(entity e) eprint                           = #31;          // prints an entire edict
  1772. +float(float yaw, float dist) walkmove   = #32;  // returns TRUE or FALSE
  1773.  // #33 was removed
  1774. -float(float yaw, float dist) droptofloor= #34;    // TRUE if landed on floor
  1775. +float(float yaw, float dist) droptofloor= #34;  // TRUE if landed on floor
  1776.  void(float style, string value) lightstyle = #35;
  1777. -float(float v) rint                    = #36;        // round to nearest int
  1778. -float(float v) floor                = #37;        // largest integer <= v
  1779. -float(float v) ceil                    = #38;        // smallest integer >= v
  1780. +float(float v) rint                                     = #36;          // round to nearest int
  1781. +float(float v) floor                            = #37;          // largest integer <= v
  1782. +float(float v) ceil                                     = #38;          // smallest integer >= v
  1783.  // #39 was removed
  1784. -float(entity e) checkbottom            = #40;        // true if self is on ground
  1785. -float(vector v) pointcontents        = #41;        // returns a CONTENT_*
  1786. +float(entity e) checkbottom                     = #40;          // true if self is on ground
  1787. +float(vector v) pointcontents           = #41;          // returns a CONTENT_*
  1788.  // #42 was removed
  1789.  float(float f) fabs = #43;
  1790. -vector(entity e, float speed) aim = #44;        // returns the shooting vector
  1791. -float(string s) cvar = #45;                        // return cvar.value
  1792. -void(string s) localcmd = #46;                    // put string into local que
  1793. -entity(entity e) nextent = #47;                    // for looping through all ents
  1794. +vector(entity e, float speed) aim = #44;                // returns the shooting vector
  1795. +float(string s) cvar = #45;                                             // return cvar.value
  1796. +void(string s) localcmd = #46;                                  // put string into local que
  1797. +entity(entity e) nextent = #47;                                 // for looping through all ents
  1798.  void(vector o, vector d, float color, float count) particle = #48;// start a particle effect
  1799. -void() ChangeYaw = #49;                        // turn towards self.ideal_yaw
  1800. +void() ChangeYaw = #49;                                         // turn towards self.ideal_yaw
  1801.                                              // at self.yaw_speed
  1802.  // #50 was removed
  1803. -vector(vector v) vectoangles            = #51;
  1804. +vector(vector v) vectoangles                    = #51;
  1805.  
  1806.  //
  1807.  // direct client message generation
  1808.  //
  1809. -void(float to, float f) WriteByte        = #52;
  1810. -void(float to, float f) WriteChar        = #53;
  1811. -void(float to, float f) WriteShort        = #54;
  1812. -void(float to, float f) WriteLong        = #55;
  1813. -void(float to, float f) WriteCoord        = #56;
  1814. -void(float to, float f) WriteAngle        = #57;
  1815. -void(float to, string s) WriteString    = #58;
  1816. -void(float to, entity s) WriteEntity    = #59;
  1817. +void(float to, float f) WriteByte               = #52;
  1818. +void(float to, float f) WriteChar               = #53;
  1819. +void(float to, float f) WriteShort              = #54;
  1820. +void(float to, float f) WriteLong               = #55;
  1821. +void(float to, float f) WriteCoord              = #56;
  1822. +void(float to, float f) WriteAngle              = #57;
  1823. +void(float to, string s) WriteString    = #58;
  1824. +void(float to, entity s) WriteEntity    = #59;
  1825.  
  1826.  //
  1827.  // broadcast client message generation
  1828.  //
  1829.  
  1830. -// void(float f) bWriteByte        = #59;
  1831. -// void(float f) bWriteChar        = #60;
  1832. -// void(float f) bWriteShort        = #61;
  1833. -// void(float f) bWriteLong        = #62;
  1834. -// void(float f) bWriteCoord        = #63;
  1835. -// void(float f) bWriteAngle        = #64;
  1836. -// void(string s) bWriteString    = #65;
  1837. +// void(float f) bWriteByte             = #59;
  1838. +// void(float f) bWriteChar             = #60;
  1839. +// void(float f) bWriteShort            = #61;
  1840. +// void(float f) bWriteLong             = #62;
  1841. +// void(float f) bWriteCoord            = #63;
  1842. +// void(float f) bWriteAngle            = #64;
  1843. +// void(string s) bWriteString  = #65;
  1844.  // void(entity e) bWriteEntity = #66;
  1845.  
  1846. -void(float step) movetogoal                = #67;
  1847. +void(float step) movetogoal                             = #67;
  1848.  
  1849. -string(string s) precache_file        = #68;    // no effect except for -copy
  1850. -void(entity e) makestatic        = #69;
  1851. +string(string s) precache_file          = #68;  // no effect except for -copy
  1852. +void(entity e) makestatic               = #69;
  1853.  void(string s) changelevel = #70;
  1854.  
  1855.  //#71 was removed
  1856.  
  1857. -void(string var, string val) cvar_set = #72;    // sets cvar.value
  1858. +void(string var, string val) cvar_set = #72;    // sets cvar.value
  1859.  
  1860. -void(entity client, string s) centerprint = #73;    // sprint, but in middle
  1861. +void(entity client, string s) centerprint = #73;        // sprint, but in middle
  1862.  
  1863.  void(vector pos, string samp, float vol, float atten) ambientsound = #74;
  1864.  
  1865. -string(string s) precache_model2    = #75;        // registered version only
  1866. -string(string s) precache_sound2    = #76;        // registered version only
  1867. -string(string s) precache_file2        = #77;        // registered version only
  1868. +string(string s) precache_model2        = #75;          // registered version only
  1869. +string(string s) precache_sound2        = #76;          // registered version only
  1870. +string(string s) precache_file2         = #77;          // registered version only
  1871.  
  1872. -void(entity e) setspawnparms        = #78;        // set parm1... to the
  1873. +void(entity e) setspawnparms            = #78;          // set parm1... to the
  1874.                                                  // values at level start
  1875.                                                  // for coop respawn
  1876.  
  1877. @@ -681,7 +702,7 @@
  1878.  void() SUB_Remove;
  1879.  
  1880.  //
  1881. -//    combat.qc
  1882. +//      combat.qc
  1883.  //
  1884.  void(entity targ, entity inflictor, entity attacker, float damage) T_Damage;
  1885.  
  1886. diff -ur --new-file v101qc/player.qc progs/player.qc
  1887. --- v101qc/player.qc    Sun Aug 18 02:29:36 1996
  1888. +++ progs/player.qc    Wed Aug 14 19:00:08 1996
  1889. @@ -11,7 +11,7 @@
  1890.  
  1891.  $cd /raid/quake/id1/models/player_4
  1892.  $origin 0 -6 24
  1893. -$base base        
  1894. +$base base              
  1895.  $skin skin
  1896.  
  1897.  //
  1898. @@ -88,7 +88,7 @@
  1899.  
  1900.  void() player_run;
  1901.  
  1902. -void()    player_stand1 =[    $axstnd1,    player_stand1    ]
  1903. +void()  player_stand1 =[        $axstnd1,       player_stand1   ]
  1904.  {
  1905.      self.weaponframe=0;
  1906.      if (self.velocity_x || self.velocity_y)
  1907. @@ -110,10 +110,10 @@
  1908.              self.walkframe = 0;
  1909.          self.frame = $stand1 + self.walkframe;
  1910.      }
  1911. -    self.walkframe = self.walkframe + 1;    
  1912. +    self.walkframe = self.walkframe + 1;    
  1913.  };
  1914.  
  1915. -void()    player_run =[    $rockrun1,    player_run    ]
  1916. +void()  player_run =[   $rockrun1,      player_run      ]
  1917.  {
  1918.      self.weaponframe=0;
  1919.      if (!self.velocity_x && !self.velocity_y)
  1920. @@ -139,33 +139,33 @@
  1921.  };
  1922.  
  1923.  
  1924. -void()    player_shot1 =    [$shotatt1, player_shot2    ] {self.weaponframe=1;
  1925. +void()  player_shot1 =  [$shotatt1, player_shot2        ] {self.weaponframe=1;
  1926.  self.effects = self.effects | EF_MUZZLEFLASH;};
  1927. -void()    player_shot2 =    [$shotatt2, player_shot3    ] {self.weaponframe=2;};
  1928. -void()    player_shot3 =    [$shotatt3, player_shot4    ] {self.weaponframe=3;};
  1929. -void()    player_shot4 =    [$shotatt4, player_shot5    ] {self.weaponframe=4;};
  1930. -void()    player_shot5 =    [$shotatt5, player_shot6    ] {self.weaponframe=5;};
  1931. -void()    player_shot6 =    [$shotatt6, player_run    ] {self.weaponframe=6;};
  1932. -
  1933. -void()    player_axe1 =    [$axatt1, player_axe2    ] {self.weaponframe=1;};
  1934. -void()    player_axe2 =    [$axatt2, player_axe3    ] {self.weaponframe=2;};
  1935. -void()    player_axe3 =    [$axatt3, player_axe4    ] {self.weaponframe=3;W_FireAxe();};
  1936. -void()    player_axe4 =    [$axatt4, player_run    ] {self.weaponframe=4;};
  1937. -
  1938. -void()    player_axeb1 =    [$axattb1, player_axeb2    ] {self.weaponframe=5;};
  1939. -void()    player_axeb2 =    [$axattb2, player_axeb3    ] {self.weaponframe=6;};
  1940. -void()    player_axeb3 =    [$axattb3, player_axeb4    ] {self.weaponframe=7;W_FireAxe();};
  1941. -void()    player_axeb4 =    [$axattb4, player_run    ] {self.weaponframe=8;};
  1942. -
  1943. -void()    player_axec1 =    [$axattc1, player_axec2    ] {self.weaponframe=1;};
  1944. -void()    player_axec2 =    [$axattc2, player_axec3    ] {self.weaponframe=2;};
  1945. -void()    player_axec3 =    [$axattc3, player_axec4    ] {self.weaponframe=3;W_FireAxe();};
  1946. -void()    player_axec4 =    [$axattc4, player_run    ] {self.weaponframe=4;};
  1947. -
  1948. -void()    player_axed1 =    [$axattd1, player_axed2    ] {self.weaponframe=5;};
  1949. -void()    player_axed2 =    [$axattd2, player_axed3    ] {self.weaponframe=6;};
  1950. -void()    player_axed3 =    [$axattd3, player_axed4    ] {self.weaponframe=7;W_FireAxe();};
  1951. -void()    player_axed4 =    [$axattd4, player_run    ] {self.weaponframe=8;};
  1952. +void()  player_shot2 =  [$shotatt2, player_shot3        ] {self.weaponframe=2;};
  1953. +void()  player_shot3 =  [$shotatt3, player_shot4        ] {self.weaponframe=3;};
  1954. +void()  player_shot4 =  [$shotatt4, player_shot5        ] {self.weaponframe=4;};
  1955. +void()  player_shot5 =  [$shotatt5, player_shot6        ] {self.weaponframe=5;};
  1956. +void()  player_shot6 =  [$shotatt6, player_run  ] {self.weaponframe=6;};
  1957. +
  1958. +void()  player_axe1 =   [$axatt1, player_axe2   ] {self.weaponframe=1;};
  1959. +void()  player_axe2 =   [$axatt2, player_axe3   ] {self.weaponframe=2;};
  1960. +void()  player_axe3 =   [$axatt3, player_axe4   ] {self.weaponframe=3;W_FireAxe();};
  1961. +void()  player_axe4 =   [$axatt4, player_run    ] {self.weaponframe=4;};
  1962. +
  1963. +void()  player_axeb1 =  [$axattb1, player_axeb2 ] {self.weaponframe=5;};
  1964. +void()  player_axeb2 =  [$axattb2, player_axeb3 ] {self.weaponframe=6;};
  1965. +void()  player_axeb3 =  [$axattb3, player_axeb4 ] {self.weaponframe=7;W_FireAxe();};
  1966. +void()  player_axeb4 =  [$axattb4, player_run   ] {self.weaponframe=8;};
  1967. +
  1968. +void()  player_axec1 =  [$axattc1, player_axec2 ] {self.weaponframe=1;};
  1969. +void()  player_axec2 =  [$axattc2, player_axec3 ] {self.weaponframe=2;};
  1970. +void()  player_axec3 =  [$axattc3, player_axec4 ] {self.weaponframe=3;W_FireAxe();};
  1971. +void()  player_axec4 =  [$axattc4, player_run   ] {self.weaponframe=4;};
  1972. +
  1973. +void()  player_axed1 =  [$axattd1, player_axed2 ] {self.weaponframe=5;};
  1974. +void()  player_axed2 =  [$axattd2, player_axed3 ] {self.weaponframe=6;};
  1975. +void()  player_axed3 =  [$axattd3, player_axed4 ] {self.weaponframe=7;W_FireAxe();};
  1976. +void()  player_axed4 =  [$axattd4, player_run   ] {self.weaponframe=8;};
  1977.  
  1978.  
  1979.  //============================================================================
  1980. @@ -240,7 +240,7 @@
  1981.  
  1982.  void() PainSound =
  1983.  {
  1984. -local float        rs;
  1985. +local float             rs;
  1986.  
  1987.      if (self.health < 0)
  1988.          return;
  1989. @@ -265,7 +265,7 @@
  1990.  // slime pain sounds
  1991.      if (self.watertype == CONTENT_SLIME)
  1992.      {
  1993. -// FIX ME    put in some steam here
  1994. +// FIX ME       put in some steam here
  1995.          if (random() > 0.5)
  1996.              sound (self, CHAN_VOICE, "player/lburn1.wav", 1, ATTN_NORM);
  1997.          else
  1998. @@ -320,19 +320,19 @@
  1999.      return;
  2000.  };
  2001.  
  2002. -void()    player_pain1 =    [    $pain1,    player_pain2    ] {PainSound();self.weaponframe=0;};
  2003. -void()    player_pain2 =    [    $pain2,    player_pain3    ] {};
  2004. -void()    player_pain3 =    [    $pain3,    player_pain4    ] {};
  2005. -void()    player_pain4 =    [    $pain4,    player_pain5    ] {};
  2006. -void()    player_pain5 =    [    $pain5,    player_pain6    ] {};
  2007. -void()    player_pain6 =    [    $pain6,    player_run    ] {};
  2008. -
  2009. -void()    player_axpain1 =    [    $axpain1,    player_axpain2    ] {PainSound();self.weaponframe=0;};
  2010. -void()    player_axpain2 =    [    $axpain2,    player_axpain3    ] {};
  2011. -void()    player_axpain3 =    [    $axpain3,    player_axpain4    ] {};
  2012. -void()    player_axpain4 =    [    $axpain4,    player_axpain5    ] {};
  2013. -void()    player_axpain5 =    [    $axpain5,    player_axpain6    ] {};
  2014. -void()    player_axpain6 =    [    $axpain6,    player_run    ] {};
  2015. +void()  player_pain1 =  [       $pain1, player_pain2    ] {PainSound();self.weaponframe=0;};
  2016. +void()  player_pain2 =  [       $pain2, player_pain3    ] {};
  2017. +void()  player_pain3 =  [       $pain3, player_pain4    ] {};
  2018. +void()  player_pain4 =  [       $pain4, player_pain5    ] {};
  2019. +void()  player_pain5 =  [       $pain5, player_pain6    ] {};
  2020. +void()  player_pain6 =  [       $pain6, player_run      ] {};
  2021. +
  2022. +void()  player_axpain1 =        [       $axpain1,       player_axpain2  ] {PainSound();self.weaponframe=0;};
  2023. +void()  player_axpain2 =        [       $axpain2,       player_axpain3  ] {};
  2024. +void()  player_axpain3 =        [       $axpain3,       player_axpain4  ] {};
  2025. +void()  player_axpain4 =        [       $axpain4,       player_axpain5  ] {};
  2026. +void()  player_axpain5 =        [       $axpain5,       player_axpain6  ] {};
  2027. +void()  player_axpain6 =        [       $axpain6,       player_run      ] {};
  2028.  
  2029.  void() player_pain =
  2030.  {
  2031. @@ -340,7 +340,7 @@
  2032.          return;
  2033.  
  2034.      if (self.invisible_finished > time)
  2035. -        return;        // eyes don't have pain frames
  2036. +        return;         // eyes don't have pain frames
  2037.  
  2038.      if (self.weapon == IT_AXE)
  2039.          player_axpain1 ();
  2040. @@ -357,7 +357,7 @@
  2041.  
  2042.  void() DeathBubblesSpawn =
  2043.  {
  2044. -local entity    bubble;
  2045. +local entity    bubble;
  2046.      if (self.owner.waterlevel != 3)
  2047.          return;
  2048.      bubble = spawn();
  2049. @@ -381,7 +381,7 @@
  2050.  
  2051.  void(float num_bubbles) DeathBubbles =
  2052.  {
  2053. -local entity    bubble_spawner;
  2054. +local entity    bubble_spawner;
  2055.      
  2056.      bubble_spawner = spawn();
  2057.      setorigin (bubble_spawner, self.origin);
  2058. @@ -398,7 +398,7 @@
  2059.  
  2060.  void() DeathSound =
  2061.  {
  2062. -local float        rs;
  2063. +local float             rs;
  2064.  
  2065.      // water death sounds
  2066.      if (self.waterlevel == 3)
  2067. @@ -442,12 +442,12 @@
  2068.  
  2069.      if (dm > -50)
  2070.      {
  2071. -//        dprint ("level 1\n");
  2072. +//              dprint ("level 1\n");
  2073.          v = v * 0.7;
  2074.      }
  2075.      else if (dm > -200)
  2076.      {
  2077. -//        dprint ("level 3\n");
  2078. +//              dprint ("level 3\n");
  2079.          v = v * 2;
  2080.      }
  2081.      else
  2082. @@ -458,7 +458,7 @@
  2083.  
  2084.  void(string gibname, float dm) ThrowGib =
  2085.  {
  2086. -    local    entity new;
  2087. +    local   entity new;
  2088.  
  2089.      new = spawn();
  2090.      new.origin = self.origin;
  2091. @@ -523,14 +523,14 @@
  2092.  
  2093.  void() PlayerDie =
  2094.  {
  2095. -    local    float    i;
  2096. +    local   float   i;
  2097.      
  2098.      self.items = self.items - (self.items & IT_INVISIBILITY);
  2099. -    self.invisible_finished = 0;    // don't die as eyes
  2100. +    self.invisible_finished = 0;    // don't die as eyes
  2101.      self.invincible_finished = 0;
  2102.      self.super_damage_finished = 0;
  2103.      self.radsuit_finished = 0;
  2104. -    self.modelindex = modelindex_player;    // don't use eyes
  2105. +    self.modelindex = modelindex_player;    // don't use eyes
  2106.  
  2107.      if (deathmatch || coop)
  2108.          DropBackpack();
  2109. @@ -579,9 +579,9 @@
  2110.  };
  2111.  
  2112.  void() set_suicide_frame =
  2113. -{    // used by klill command and diconnect command
  2114. +{       // used by klill command and diconnect command
  2115.      if (self.model != "progs/player.mdl")
  2116. -        return;    // allready gibbed
  2117. +        return; // allready gibbed
  2118.      self.frame = $deatha11;
  2119.      self.solid = SOLID_NOT;
  2120.      self.movetype = MOVETYPE_TOSS;
  2121. @@ -590,70 +590,70 @@
  2122.  };
  2123.  
  2124.  
  2125. -void()    player_diea1    =    [    $deatha1,    player_diea2    ] {};
  2126. -void()    player_diea2    =    [    $deatha2,    player_diea3    ] {};
  2127. -void()    player_diea3    =    [    $deatha3,    player_diea4    ] {};
  2128. -void()    player_diea4    =    [    $deatha4,    player_diea5    ] {};
  2129. -void()    player_diea5    =    [    $deatha5,    player_diea6    ] {};
  2130. -void()    player_diea6    =    [    $deatha6,    player_diea7    ] {};
  2131. -void()    player_diea7    =    [    $deatha7,    player_diea8    ] {};
  2132. -void()    player_diea8    =    [    $deatha8,    player_diea9    ] {};
  2133. -void()    player_diea9    =    [    $deatha9,    player_diea10    ] {};
  2134. -void()    player_diea10    =    [    $deatha10,    player_diea11    ] {};
  2135. -void()    player_diea11    =    [    $deatha11,    player_diea11 ] {PlayerDead();};
  2136. -
  2137. -void()    player_dieb1    =    [    $deathb1,    player_dieb2    ] {};
  2138. -void()    player_dieb2    =    [    $deathb2,    player_dieb3    ] {};
  2139. -void()    player_dieb3    =    [    $deathb3,    player_dieb4    ] {};
  2140. -void()    player_dieb4    =    [    $deathb4,    player_dieb5    ] {};
  2141. -void()    player_dieb5    =    [    $deathb5,    player_dieb6    ] {};
  2142. -void()    player_dieb6    =    [    $deathb6,    player_dieb7    ] {};
  2143. -void()    player_dieb7    =    [    $deathb7,    player_dieb8    ] {};
  2144. -void()    player_dieb8    =    [    $deathb8,    player_dieb9    ] {};
  2145. -void()    player_dieb9    =    [    $deathb9,    player_dieb9    ] {PlayerDead();};
  2146. -
  2147. -void()    player_diec1    =    [    $deathc1,    player_diec2    ] {};
  2148. -void()    player_diec2    =    [    $deathc2,    player_diec3    ] {};
  2149. -void()    player_diec3    =    [    $deathc3,    player_diec4    ] {};
  2150. -void()    player_diec4    =    [    $deathc4,    player_diec5    ] {};
  2151. -void()    player_diec5    =    [    $deathc5,    player_diec6    ] {};
  2152. -void()    player_diec6    =    [    $deathc6,    player_diec7    ] {};
  2153. -void()    player_diec7    =    [    $deathc7,    player_diec8    ] {};
  2154. -void()    player_diec8    =    [    $deathc8,    player_diec9    ] {};
  2155. -void()    player_diec9    =    [    $deathc9,    player_diec10    ] {};
  2156. -void()    player_diec10    =    [    $deathc10,    player_diec11    ] {};
  2157. -void()    player_diec11    =    [    $deathc11,    player_diec12    ] {};
  2158. -void()    player_diec12    =    [    $deathc12,    player_diec13    ] {};
  2159. -void()    player_diec13    =    [    $deathc13,    player_diec14    ] {};
  2160. -void()    player_diec14    =    [    $deathc14,    player_diec15    ] {};
  2161. -void()    player_diec15    =    [    $deathc15,    player_diec15 ] {PlayerDead();};
  2162. -
  2163. -void()    player_died1    =    [    $deathd1,    player_died2    ] {};
  2164. -void()    player_died2    =    [    $deathd2,    player_died3    ] {};
  2165. -void()    player_died3    =    [    $deathd3,    player_died4    ] {};
  2166. -void()    player_died4    =    [    $deathd4,    player_died5    ] {};
  2167. -void()    player_died5    =    [    $deathd5,    player_died6    ] {};
  2168. -void()    player_died6    =    [    $deathd6,    player_died7    ] {};
  2169. -void()    player_died7    =    [    $deathd7,    player_died8    ] {};
  2170. -void()    player_died8    =    [    $deathd8,    player_died9    ] {};
  2171. -void()    player_died9    =    [    $deathd9,    player_died9    ] {PlayerDead();};
  2172. -
  2173. -void()    player_diee1    =    [    $deathe1,    player_diee2    ] {};
  2174. -void()    player_diee2    =    [    $deathe2,    player_diee3    ] {};
  2175. -void()    player_diee3    =    [    $deathe3,    player_diee4    ] {};
  2176. -void()    player_diee4    =    [    $deathe4,    player_diee5    ] {};
  2177. -void()    player_diee5    =    [    $deathe5,    player_diee6    ] {};
  2178. -void()    player_diee6    =    [    $deathe6,    player_diee7    ] {};
  2179. -void()    player_diee7    =    [    $deathe7,    player_diee8    ] {};
  2180. -void()    player_diee8    =    [    $deathe8,    player_diee9    ] {};
  2181. -void()    player_diee9    =    [    $deathe9,    player_diee9    ] {PlayerDead();};
  2182. -
  2183. -void()    player_die_ax1    =    [    $axdeth1,    player_die_ax2    ] {};
  2184. -void()    player_die_ax2    =    [    $axdeth2,    player_die_ax3    ] {};
  2185. -void()    player_die_ax3    =    [    $axdeth3,    player_die_ax4    ] {};
  2186. -void()    player_die_ax4    =    [    $axdeth4,    player_die_ax5    ] {};
  2187. -void()    player_die_ax5    =    [    $axdeth5,    player_die_ax6    ] {};
  2188. -void()    player_die_ax6    =    [    $axdeth6,    player_die_ax7    ] {};
  2189. -void()    player_die_ax7    =    [    $axdeth7,    player_die_ax8    ] {};
  2190. -void()    player_die_ax8    =    [    $axdeth8,    player_die_ax9    ] {};
  2191. -void()    player_die_ax9    =    [    $axdeth9,    player_die_ax9    ] {PlayerDead();};
  2192. +void()  player_diea1    =       [       $deatha1,       player_diea2    ] {};
  2193. +void()  player_diea2    =       [       $deatha2,       player_diea3    ] {};
  2194. +void()  player_diea3    =       [       $deatha3,       player_diea4    ] {};
  2195. +void()  player_diea4    =       [       $deatha4,       player_diea5    ] {};
  2196. +void()  player_diea5    =       [       $deatha5,       player_diea6    ] {};
  2197. +void()  player_diea6    =       [       $deatha6,       player_diea7    ] {};
  2198. +void()  player_diea7    =       [       $deatha7,       player_diea8    ] {};
  2199. +void()  player_diea8    =       [       $deatha8,       player_diea9    ] {};
  2200. +void()  player_diea9    =       [       $deatha9,       player_diea10   ] {};
  2201. +void()  player_diea10   =       [       $deatha10,      player_diea11   ] {};
  2202. +void()  player_diea11   =       [       $deatha11,      player_diea11 ] {PlayerDead();};
  2203. +
  2204. +void()  player_dieb1    =       [       $deathb1,       player_dieb2    ] {};
  2205. +void()  player_dieb2    =       [       $deathb2,       player_dieb3    ] {};
  2206. +void()  player_dieb3    =       [       $deathb3,       player_dieb4    ] {};
  2207. +void()  player_dieb4    =       [       $deathb4,       player_dieb5    ] {};
  2208. +void()  player_dieb5    =       [       $deathb5,       player_dieb6    ] {};
  2209. +void()  player_dieb6    =       [       $deathb6,       player_dieb7    ] {};
  2210. +void()  player_dieb7    =       [       $deathb7,       player_dieb8    ] {};
  2211. +void()  player_dieb8    =       [       $deathb8,       player_dieb9    ] {};
  2212. +void()  player_dieb9    =       [       $deathb9,       player_dieb9    ] {PlayerDead();};
  2213. +
  2214. +void()  player_diec1    =       [       $deathc1,       player_diec2    ] {};
  2215. +void()  player_diec2    =       [       $deathc2,       player_diec3    ] {};
  2216. +void()  player_diec3    =       [       $deathc3,       player_diec4    ] {};
  2217. +void()  player_diec4    =       [       $deathc4,       player_diec5    ] {};
  2218. +void()  player_diec5    =       [       $deathc5,       player_diec6    ] {};
  2219. +void()  player_diec6    =       [       $deathc6,       player_diec7    ] {};
  2220. +void()  player_diec7    =       [       $deathc7,       player_diec8    ] {};
  2221. +void()  player_diec8    =       [       $deathc8,       player_diec9    ] {};
  2222. +void()  player_diec9    =       [       $deathc9,       player_diec10   ] {};
  2223. +void()  player_diec10   =       [       $deathc10,      player_diec11   ] {};
  2224. +void()  player_diec11   =       [       $deathc11,      player_diec12   ] {};
  2225. +void()  player_diec12   =       [       $deathc12,      player_diec13   ] {};
  2226. +void()  player_diec13   =       [       $deathc13,      player_diec14   ] {};
  2227. +void()  player_diec14   =       [       $deathc14,      player_diec15   ] {};
  2228. +void()  player_diec15   =       [       $deathc15,      player_diec15 ] {PlayerDead();};
  2229. +
  2230. +void()  player_died1    =       [       $deathd1,       player_died2    ] {};
  2231. +void()  player_died2    =       [       $deathd2,       player_died3    ] {};
  2232. +void()  player_died3    =       [       $deathd3,       player_died4    ] {};
  2233. +void()  player_died4    =       [       $deathd4,       player_died5    ] {};
  2234. +void()  player_died5    =       [       $deathd5,       player_died6    ] {};
  2235. +void()  player_died6    =       [       $deathd6,       player_died7    ] {};
  2236. +void()  player_died7    =       [       $deathd7,       player_died8    ] {};
  2237. +void()  player_died8    =       [       $deathd8,       player_died9    ] {};
  2238. +void()  player_died9    =       [       $deathd9,       player_died9    ] {PlayerDead();};
  2239. +
  2240. +void()  player_diee1    =       [       $deathe1,       player_diee2    ] {};
  2241. +void()  player_diee2    =       [       $deathe2,       player_diee3    ] {};
  2242. +void()  player_diee3    =       [       $deathe3,       player_diee4    ] {};
  2243. +void()  player_diee4    =       [       $deathe4,       player_diee5    ] {};
  2244. +void()  player_diee5    =       [       $deathe5,       player_diee6    ] {};
  2245. +void()  player_diee6    =       [       $deathe6,       player_diee7    ] {};
  2246. +void()  player_diee7    =       [       $deathe7,       player_diee8    ] {};
  2247. +void()  player_diee8    =       [       $deathe8,       player_diee9    ] {};
  2248. +void()  player_diee9    =       [       $deathe9,       player_diee9    ] {PlayerDead();};
  2249. +
  2250. +void()  player_die_ax1  =       [       $axdeth1,       player_die_ax2  ] {};
  2251. +void()  player_die_ax2  =       [       $axdeth2,       player_die_ax3  ] {};
  2252. +void()  player_die_ax3  =       [       $axdeth3,       player_die_ax4  ] {};
  2253. +void()  player_die_ax4  =       [       $axdeth4,       player_die_ax5  ] {};
  2254. +void()  player_die_ax5  =       [       $axdeth5,       player_die_ax6  ] {};
  2255. +void()  player_die_ax6  =       [       $axdeth6,       player_die_ax7  ] {};
  2256. +void()  player_die_ax7  =       [       $axdeth7,       player_die_ax8  ] {};
  2257. +void()  player_die_ax8  =       [       $axdeth8,       player_die_ax9  ] {};
  2258. +void()  player_die_ax9  =       [       $axdeth9,       player_die_ax9  ] {PlayerDead();};
  2259. diff -ur --new-file v101qc/progdefs.h progs/progdefs.h
  2260. --- v101qc/progdefs.h    Thu Jan  1 08:00:00 1970
  2261. +++ progs/progdefs.h    Tue Aug 20 19:12:40 1996
  2262. @@ -0,0 +1,143 @@
  2263. +
  2264. +/* file generated by qcc, do not modify */
  2265. +
  2266. +typedef struct
  2267. +{    int    pad[28];
  2268. +    int    self;
  2269. +    int    other;
  2270. +    int    world;
  2271. +    float    time;
  2272. +    float    frametime;
  2273. +    float    force_retouch;
  2274. +    string_t    mapname;
  2275. +    float    deathmatch;
  2276. +    float    coop;
  2277. +    float    teamplay;
  2278. +    float    serverflags;
  2279. +    float    total_secrets;
  2280. +    float    total_monsters;
  2281. +    float    found_secrets;
  2282. +    float    killed_monsters;
  2283. +    float    parm1;
  2284. +    float    parm2;
  2285. +    float    parm3;
  2286. +    float    parm4;
  2287. +    float    parm5;
  2288. +    float    parm6;
  2289. +    float    parm7;
  2290. +    float    parm8;
  2291. +    float    parm9;
  2292. +    float    parm10;
  2293. +    float    parm11;
  2294. +    float    parm12;
  2295. +    float    parm13;
  2296. +    float    parm14;
  2297. +    float    parm15;
  2298. +    float    parm16;
  2299. +    vec3_t    v_forward;
  2300. +    vec3_t    v_up;
  2301. +    vec3_t    v_right;
  2302. +    float    trace_allsolid;
  2303. +    float    trace_startsolid;
  2304. +    float    trace_fraction;
  2305. +    vec3_t    trace_endpos;
  2306. +    vec3_t    trace_plane_normal;
  2307. +    float    trace_plane_dist;
  2308. +    int    trace_ent;
  2309. +    float    trace_inopen;
  2310. +    float    trace_inwater;
  2311. +    int    msg_entity;
  2312. +    func_t    main;
  2313. +    func_t    StartFrame;
  2314. +    func_t    PlayerPreThink;
  2315. +    func_t    PlayerPostThink;
  2316. +    func_t    ClientKill;
  2317. +    func_t    ClientConnect;
  2318. +    func_t    PutClientInServer;
  2319. +    func_t    ClientDisconnect;
  2320. +    func_t    SetNewParms;
  2321. +    func_t    SetChangeParms;
  2322. +} globalvars_t;
  2323. +
  2324. +typedef struct
  2325. +{
  2326. +    float    modelindex;
  2327. +    vec3_t    absmin;
  2328. +    vec3_t    absmax;
  2329. +    float    ltime;
  2330. +    float    movetype;
  2331. +    float    solid;
  2332. +    vec3_t    origin;
  2333. +    vec3_t    oldorigin;
  2334. +    vec3_t    velocity;
  2335. +    vec3_t    angles;
  2336. +    vec3_t    avelocity;
  2337. +    vec3_t    punchangle;
  2338. +    string_t    classname;
  2339. +    string_t    model;
  2340. +    float    frame;
  2341. +    float    skin;
  2342. +    float    effects;
  2343. +    vec3_t    mins;
  2344. +    vec3_t    maxs;
  2345. +    vec3_t    size;
  2346. +    func_t    touch;
  2347. +    func_t    use;
  2348. +    func_t    think;
  2349. +    func_t    blocked;
  2350. +    float    nextthink;
  2351. +    int    groundentity;
  2352. +    float    health;
  2353. +    float    frags;
  2354. +    float    weapon;
  2355. +    string_t    weaponmodel;
  2356. +    float    weaponframe;
  2357. +    float    currentammo;
  2358. +    float    ammo_shells;
  2359. +    float    ammo_nails;
  2360. +    float    ammo_rockets;
  2361. +    float    ammo_cells;
  2362. +    float    items;
  2363. +    float    takedamage;
  2364. +    int    chain;
  2365. +    float    deadflag;
  2366. +    vec3_t    view_ofs;
  2367. +    float    button0;
  2368. +    float    button1;
  2369. +    float    button2;
  2370. +    float    impulse;
  2371. +    float    fixangle;
  2372. +    vec3_t    v_angle;
  2373. +    float    idealpitch;
  2374. +    string_t    netname;
  2375. +    int    enemy;
  2376. +    float    flags;
  2377. +    float    colormap;
  2378. +    float    team;
  2379. +    float    max_health;
  2380. +    float    teleport_time;
  2381. +    float    armortype;
  2382. +    float    armorvalue;
  2383. +    float    waterlevel;
  2384. +    float    watertype;
  2385. +    float    ideal_yaw;
  2386. +    float    yaw_speed;
  2387. +    int    aiment;
  2388. +    int    goalentity;
  2389. +    float    spawnflags;
  2390. +    string_t    target;
  2391. +    string_t    targetname;
  2392. +    float    dmg_take;
  2393. +    float    dmg_save;
  2394. +    int    dmg_inflictor;
  2395. +    int    owner;
  2396. +    vec3_t    movedir;
  2397. +    string_t    message;
  2398. +    float    sounds;
  2399. +    string_t    noise;
  2400. +    string_t    noise1;
  2401. +    string_t    noise2;
  2402. +    string_t    noise3;
  2403. +} entvars_t;
  2404. +
  2405. +#define PROGHEADER_CRC 5927
  2406. diff -ur --new-file v101qc/progs.src progs/progs.src
  2407. --- v101qc/progs.src    Sun Aug 18 02:29:36 1996
  2408. +++ progs/progs.src    Wed Aug 14 18:46:28 1996
  2409. @@ -6,6 +6,7 @@
  2410.  ai.qc
  2411.  combat.qc
  2412.  items.qc
  2413. +cbnmods.qc
  2414.  weapons.qc
  2415.  world.qc
  2416.  client.qc
  2417. @@ -27,9 +28,9 @@
  2418.  zombie.qc
  2419.  boss.qc
  2420.  
  2421. -tarbaby.qc        // registered
  2422. -hknight.qc        // registered
  2423. -fish.qc            // registered
  2424. -shalrath.qc        // registered
  2425. -enforcer.qc        // registered
  2426. -oldone.qc        // registered
  2427. +tarbaby.qc              // registered
  2428. +hknight.qc              // registered
  2429. +fish.qc                 // registered
  2430. +shalrath.qc             // registered
  2431. +enforcer.qc             // registered
  2432. +oldone.qc               // registered
  2433. diff -ur --new-file v101qc/triggers.qc progs/triggers.qc
  2434. --- v101qc/triggers.qc    Sun Aug 18 02:29:36 1996
  2435. +++ progs/triggers.qc    Thu Aug 15 23:29:42 1996
  2436. @@ -9,8 +9,8 @@
  2437.  
  2438.  //=============================================================================
  2439.  
  2440. -float    SPAWNFLAG_NOMESSAGE = 1;
  2441. -float    SPAWNFLAG_NOTOUCH = 1;
  2442. +float   SPAWNFLAG_NOMESSAGE = 1;
  2443. +float   SPAWNFLAG_NOTOUCH = 1;
  2444.  
  2445.  // the wait time has passed, so set back up for another activation
  2446.  void() multi_wait =
  2447. @@ -31,7 +31,7 @@
  2448.  {
  2449.      if (self.nextthink > time)
  2450.      {
  2451. -        return;        // allready been triggered
  2452. +        return;         // allready been triggered
  2453.      }
  2454.  
  2455.      if (self.classname == "trigger_secret")
  2456. @@ -52,13 +52,13 @@
  2457.      
  2458.      SUB_UseTargets();
  2459.  
  2460. -    if (self.wait > 0)    
  2461. +    if (self.wait > 0)      
  2462.      {
  2463.          self.think = multi_wait;
  2464.          self.nextthink = time + self.wait;
  2465.      }
  2466.      else
  2467. -    {    // we can't just remove (self) here, because this is a touch function
  2468. +    {       // we can't just remove (self) here, because this is a touch function
  2469.          // called wheil C code is looping through area links...
  2470.          self.touch = SUB_Null;
  2471.          self.nextthink = time + 0.1;
  2472. @@ -88,7 +88,7 @@
  2473.      {
  2474.          makevectors (other.angles);
  2475.          if (v_forward * self.movedir < 0)
  2476. -            return;        // not facing the right way
  2477. +            return;         // not facing the right way
  2478.      }
  2479.      
  2480.      self.enemy = other;
  2481. @@ -102,9 +102,9 @@
  2482.  If notouch is set, the trigger is only fired by other entities, not by touching.
  2483.  NOTOUCH has been obsoleted by trigger_relay!
  2484.  sounds
  2485. -1)    secret
  2486. -2)    beep beep
  2487. -3)    large switch
  2488. +1)      secret
  2489. +2)      beep beep
  2490. +3)      large switch
  2491.  4)
  2492.  set "message" to text string
  2493.  */
  2494. @@ -140,7 +140,7 @@
  2495.          self.th_die = multi_killed;
  2496.          self.takedamage = DAMAGE_YES;
  2497.          self.solid = SOLID_BBOX;
  2498. -        setorigin (self, self.origin);    // make sure it links into the world
  2499. +        setorigin (self, self.origin);  // make sure it links into the world
  2500.      }
  2501.      else
  2502.      {
  2503. @@ -159,9 +159,9 @@
  2504.  if "killtarget" is set, any objects that have a matching "target" will be removed when the trigger is fired.
  2505.  if "angle" is set, the trigger will only fire when someone is facing the direction of the angle.  Use "360" for an angle of 0.
  2506.  sounds
  2507. -1)    secret
  2508. -2)    beep beep
  2509. -3)    large switch
  2510. +1)      secret
  2511. +2)      beep beep
  2512. +3)      large switch
  2513.  4)
  2514.  set "message" to text string
  2515.  */
  2516. @@ -187,8 +187,8 @@
  2517.  /*QUAKED trigger_secret (.5 .5 .5) ?
  2518.  secret counter trigger
  2519.  sounds
  2520. -1)    secret
  2521. -2)    beep beep
  2522. +1)      secret
  2523. +2)      beep beep
  2524.  3)
  2525.  4)
  2526.  set "message" to text string
  2527. @@ -276,13 +276,13 @@
  2528.  ==============================================================================
  2529.  */
  2530.  
  2531. -float    PLAYER_ONLY    = 1;
  2532. -float    SILENT = 2;
  2533. +float   PLAYER_ONLY     = 1;
  2534. +float   SILENT = 2;
  2535.  
  2536.  void() play_teleport =
  2537.  {
  2538. -    local    float v;
  2539. -    local    string tmpstr;
  2540. +    local   float v;
  2541. +    local   string tmpstr;
  2542.  
  2543.      v = random() * 5;
  2544.      if (v < 1)
  2545. @@ -326,7 +326,7 @@
  2546.          if (other.invincible_finished > time)
  2547.              self.classname = "teledeath2";
  2548.          if (self.owner.classname != "player")
  2549. -        {    // other monsters explode themselves
  2550. +        {       // other monsters explode themselves
  2551.              T_Damage (self.owner, self, self, 50000);
  2552.              return;
  2553.          }
  2554. @@ -342,7 +342,7 @@
  2555.  
  2556.  void(vector org, entity death_owner) spawn_tdeath =
  2557.  {
  2558. -local entity    death;
  2559. +local entity    death;
  2560.  
  2561.      death = spawn();
  2562.      death.classname = "teledeath";
  2563. @@ -356,25 +356,29 @@
  2564.      death.think = SUB_Remove;
  2565.      death.owner = death_owner;
  2566.      
  2567. -    force_retouch = 2;        // make sure even still objects get hit
  2568. +    force_retouch = 2;              // make sure even still objects get hit
  2569.  };
  2570.  
  2571.  void() teleport_touch =
  2572.  {
  2573. -local entity    t;
  2574. -local vector    org;
  2575. +local entity    t;
  2576. +local vector    org;
  2577.  
  2578.      if (self.targetname)
  2579.      {
  2580.          if (self.nextthink < time)
  2581.          {
  2582. -            return;        // not fired yet
  2583. +            return;         // not fired yet
  2584.          }
  2585.      }
  2586.  
  2587. -    if (self.spawnflags & PLAYER_ONLY)
  2588. +/*        if (self.spawnflags & PLAYER_ONLY)
  2589.      {
  2590. +//PATCH - CN, Aug 96: make rockets and grenades teleport
  2591. +bprint (other.classname);
  2592.          if (other.classname != "player")
  2593. +          if (other.classname != "grenade")
  2594. +            if (other.classname != "rocket")
  2595.              return;
  2596.      }
  2597.  
  2598. @@ -384,6 +388,8 @@
  2599.  
  2600.      SUB_UseTargets ();
  2601.  
  2602. +*/
  2603. +
  2604.  // put a tfog where the player was
  2605.      spawn_tfog (other.origin);
  2606.  
  2607. @@ -410,7 +416,7 @@
  2608.      other.angles = t.mangle;
  2609.      if (other.classname == "player")
  2610.      {
  2611. -        other.fixangle = 1;        // turn this way immediately
  2612. +        other.fixangle = 1;             // turn this way immediately
  2613.          other.teleport_time = time + 0.7;
  2614.          if (other.flags & FL_ONGROUND)
  2615.              other.flags = other.flags - FL_ONGROUND;
  2616. @@ -436,7 +442,7 @@
  2617.  void() teleport_use =
  2618.  {
  2619.      self.nextthink = time + 0.2;
  2620. -    force_retouch = 2;        // make sure even still objects get hit
  2621. +    force_retouch = 2;              // make sure even still objects get hit
  2622.      self.think = SUB_Null;
  2623.  };
  2624.  
  2625. diff -ur --new-file v101qc/weapons.qc progs/weapons.qc
  2626. --- v101qc/weapons.qc    Sun Aug 18 02:29:36 1996
  2627. +++ progs/weapons.qc    Tue Aug 20 19:09:40 1996
  2628. @@ -6,22 +6,21 @@
  2629.  void(vector org, vector vel, float damage) SpawnBlood;
  2630.  void() SuperDamageSound;
  2631.  
  2632. -
  2633.  // called by worldspawn
  2634.  void() W_Precache =
  2635.  {
  2636. -    precache_sound ("weapons/r_exp3.wav");    // new rocket explosion
  2637. -    precache_sound ("weapons/rocket1i.wav");    // spike gun
  2638. +    precache_sound ("weapons/r_exp3.wav");  // new rocket explosion
  2639. +    precache_sound ("weapons/rocket1i.wav");        // spike gun
  2640.      precache_sound ("weapons/sgun1.wav");
  2641. -    precache_sound ("weapons/guncock.wav");    // player shotgun
  2642. -    precache_sound ("weapons/ric1.wav");    // ricochet (used in c code)
  2643. -    precache_sound ("weapons/ric2.wav");    // ricochet (used in c code)
  2644. -    precache_sound ("weapons/ric3.wav");    // ricochet (used in c code)
  2645. -    precache_sound ("weapons/spike2.wav");    // super spikes
  2646. -    precache_sound ("weapons/tink1.wav");    // spikes tink (used in c code)
  2647. -    precache_sound ("weapons/grenade.wav");    // grenade launcher
  2648. -    precache_sound ("weapons/bounce.wav");        // grenade bounce
  2649. -    precache_sound ("weapons/shotgn2.wav");    // super shotgun
  2650. +    precache_sound ("weapons/guncock.wav"); // player shotgun
  2651. +    precache_sound ("weapons/ric1.wav");    // ricochet (used in c code)
  2652. +    precache_sound ("weapons/ric2.wav");    // ricochet (used in c code)
  2653. +    precache_sound ("weapons/ric3.wav");    // ricochet (used in c code)
  2654. +    precache_sound ("weapons/spike2.wav");  // super spikes
  2655. +    precache_sound ("weapons/tink1.wav");   // spikes tink (used in c code)
  2656. +    precache_sound ("weapons/grenade.wav"); // grenade launcher
  2657. +    precache_sound ("weapons/bounce.wav");          // grenade bounce
  2658. +    precache_sound ("weapons/shotgn2.wav"); // super shotgun
  2659.  };
  2660.  
  2661.  float() crandom =
  2662. @@ -36,8 +35,8 @@
  2663.  */
  2664.  void() W_FireAxe =
  2665.  {
  2666. -    local    vector    source;
  2667. -    local    vector    org;
  2668. +    local   vector  source;
  2669. +    local   vector  org;
  2670.  
  2671.      source = self.origin + '0 0 16';
  2672.      traceline (source, source + v_forward*64, FALSE, self);
  2673. @@ -53,7 +52,7 @@
  2674.          T_Damage (trace_ent, self, self, 20);
  2675.      }
  2676.      else
  2677. -    {    // hit wall
  2678. +    {       // hit wall
  2679.          sound (self, CHAN_WEAPON, "player/axhit2.wav", 1, ATTN_NORM);
  2680.          WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
  2681.          WriteByte (MSG_BROADCAST, TE_GUNSHOT);
  2682. @@ -69,7 +68,7 @@
  2683.  
  2684.  vector() wall_velocity =
  2685.  {
  2686. -    local vector    vel;
  2687. +    local vector    vel;
  2688.      
  2689.      vel = normalize (self.velocity);
  2690.      vel = normalize(vel + v_up*(random()- 0.5) + v_right*(random()- 0.5));
  2691. @@ -87,8 +86,8 @@
  2692.  */
  2693.  void(vector org, vector vel) SpawnMeatSpray =
  2694.  {
  2695. -    local    entity missile, mpuff;
  2696. -    local    vector    org;
  2697. +    local   entity missile, mpuff;
  2698. +    local   vector  org;
  2699.  
  2700.      missile = spawn ();
  2701.      missile.owner = self;
  2702. @@ -107,7 +106,7 @@
  2703.      missile.think = SUB_Remove;
  2704.  
  2705.      setmodel (missile, "progs/zom_gib.mdl");
  2706. -    setsize (missile, '0 0 0', '0 0 0');        
  2707. +    setsize (missile, '0 0 0', '0 0 0');            
  2708.      setorigin (missile, org);
  2709.  };
  2710.  
  2711. @@ -128,7 +127,7 @@
  2712.  */
  2713.  void(float damage) spawn_touchblood =
  2714.  {
  2715. -    local vector    vel;
  2716. +    local vector    vel;
  2717.  
  2718.      vel = wall_velocity () * 0.2;
  2719.      SpawnBlood (self.origin + vel*0.01, vel, damage);
  2720. @@ -155,8 +154,8 @@
  2721.  ==============================================================================
  2722.  */
  2723.  
  2724. -entity    multi_ent;
  2725. -float    multi_damage;
  2726. +entity  multi_ent;
  2727. +float   multi_damage;
  2728.  
  2729.  void() ClearMultiDamage =
  2730.  {
  2731. @@ -201,7 +200,7 @@
  2732.  */
  2733.  void(float damage, vector dir) TraceAttack =
  2734.  {
  2735. -    local    vector    vel, org;
  2736. +    local   vector  vel, org;
  2737.      
  2738.      vel = normalize(dir + v_up*crandom() + v_right*crandom());
  2739.      vel = vel + 2*trace_plane_normal;
  2740. @@ -234,8 +233,8 @@
  2741.  */
  2742.  void(float shotcount, vector dir, vector spread) FireBullets =
  2743.  {
  2744. -    local    vector direction;
  2745. -    local    vector    src;
  2746. +    local   vector direction;
  2747. +    local   vector  src;
  2748.      
  2749.      makevectors(self.v_angle);
  2750.  
  2751. @@ -265,7 +264,7 @@
  2752.  {
  2753.      local vector dir;
  2754.  
  2755. -    sound (self, CHAN_WEAPON, "weapons/guncock.wav", 1, ATTN_NORM);    
  2756. +    sound (self, CHAN_WEAPON, "weapons/guncock.wav", 1, ATTN_NORM); 
  2757.  
  2758.      self.punchangle_x = -2;
  2759.      
  2760. @@ -290,7 +289,7 @@
  2761.          return;
  2762.      }
  2763.          
  2764. -    sound (self ,CHAN_WEAPON, "weapons/shotgn2.wav", 1, ATTN_NORM);    
  2765. +    sound (self ,CHAN_WEAPON, "weapons/shotgn2.wav", 1, ATTN_NORM); 
  2766.  
  2767.      self.punchangle_x = -4;
  2768.      
  2769. @@ -308,12 +307,12 @@
  2770.  ==============================================================================
  2771.  */
  2772.  
  2773. -void()    s_explode1    =    [0,        s_explode2] {};
  2774. -void()    s_explode2    =    [1,        s_explode3] {};
  2775. -void()    s_explode3    =    [2,        s_explode4] {};
  2776. -void()    s_explode4    =    [3,        s_explode5] {};
  2777. -void()    s_explode5    =    [4,        s_explode6] {};
  2778. -void()    s_explode6    =    [5,        SUB_Remove] {};
  2779. +void()  s_explode1      =       [0,             s_explode2] {};
  2780. +void()  s_explode2      =       [1,             s_explode3] {};
  2781. +void()  s_explode3      =       [2,             s_explode4] {};
  2782. +void()  s_explode4      =       [3,             s_explode5] {};
  2783. +void()  s_explode5      =       [4,             s_explode6] {};
  2784. +void()  s_explode6      =       [5,             SUB_Remove] {};
  2785.  
  2786.  void() BecomeExplosion =
  2787.  {
  2788. @@ -327,10 +326,10 @@
  2789.  
  2790.  void() T_MissileTouch =
  2791.  {
  2792. -    local float    damg;
  2793. +    local float     damg;
  2794.  
  2795.      if (other == self.owner)
  2796. -        return;        // don't explode on owner
  2797. +        return;         // don't explode on owner
  2798.  
  2799.      if (pointcontents(self.origin) == CONTENT_SKY)
  2800.      {
  2801. @@ -343,7 +342,7 @@
  2802.      if (other.health)
  2803.      {
  2804.          if (other.classname == "monster_shambler")
  2805. -            damg = damg * 0.5;    // mostly immune
  2806. +            damg = damg * 0.5;      // mostly immune
  2807.          T_Damage (other, self, self.owner, damg );
  2808.      }
  2809.  
  2810. @@ -351,7 +350,7 @@
  2811.      // was done in the impact
  2812.      T_RadiusDamage (self, self.owner, 120, other);
  2813.  
  2814. -//    sound (self, CHAN_WEAPON, "weapons/r_exp3.wav", 1, ATTN_NORM);
  2815. +//      sound (self, CHAN_WEAPON, "weapons/r_exp3.wav", 1, ATTN_NORM);
  2816.      self.origin = self.origin - 8*normalize(self.velocity);
  2817.  
  2818.      WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
  2819. @@ -364,7 +363,6 @@
  2820.  };
  2821.  
  2822.  
  2823. -
  2824.  /*
  2825.  ================
  2826.  W_FireRocket
  2827. @@ -372,7 +370,8 @@
  2828.  */
  2829.  void() W_FireRocket =
  2830.  {
  2831. -    local    entity missile, mpuff;
  2832. +    local   entity missile, mpuff;
  2833. +    local   vector recoil;
  2834.      
  2835.      self.currentammo = self.ammo_rockets = self.ammo_rockets - 1;
  2836.      
  2837. @@ -385,22 +384,35 @@
  2838.      missile.movetype = MOVETYPE_FLYMISSILE;
  2839.      missile.solid = SOLID_BBOX;
  2840.          
  2841. -// set missile speed    
  2842. +// set missile speed    
  2843.  
  2844.      makevectors (self.v_angle);
  2845.      missile.velocity = aim(self, 1000);
  2846. +    recoil = missile.velocity * 150;  // CN_PATCH - calculate recoil
  2847.      missile.velocity = missile.velocity * 1000;
  2848.      missile.angles = vectoangles(missile.velocity);
  2849.      
  2850.      missile.touch = T_MissileTouch;
  2851.      
  2852. -// set missile duration
  2853. -    missile.nextthink = time + 5;
  2854. -    missile.think = SUB_Remove;
  2855.  
  2856.      setmodel (missile, "progs/missile.mdl");
  2857. -    setsize (missile, '0 0 0', '0 0 0');        
  2858. +    setsize (missile, '0 0 0', '0 0 0');            
  2859.      setorigin (missile, self.origin + v_forward*8 + '0 0 16');
  2860. +
  2861. +
  2862. +//CN_PATCH - Aug 96: Setup for missiles in water and player recoil
  2863. +    missile.nextthink = time + 0.1;
  2864. +    missile.duration = time + 6;
  2865. +    missile.think = CN_Missile_Think;
  2866. +    missile.jump_flag = FALSE; // use these fields for our own use
  2867. +    missile.swim_flag = FALSE;
  2868. +    missile.classname = "rocket";
  2869. +
  2870. +    // Give some good 'ol Newtonian recoil
  2871. +    self.velocity = self.velocity - recoil;
  2872. +    self.avelocity = vectoangles(self.velocity);
  2873. +// END CN_PATCH
  2874. +
  2875.  };
  2876.  
  2877.  /*
  2878. @@ -418,8 +430,8 @@
  2879.  */
  2880.  void(vector p1, vector p2, entity from, float damage) LightningDamage =
  2881.  {
  2882. -    local entity        e1, e2;
  2883. -    local vector        f;
  2884. +    local entity            e1, e2;
  2885. +    local vector            f;
  2886.      
  2887.      f = p2 - p1;
  2888.      normalize (f);
  2889. @@ -462,7 +474,7 @@
  2890.  
  2891.  void() W_FireLightning =
  2892.  {
  2893. -    local    vector        org;
  2894. +    local   vector          org;
  2895.  
  2896.      if (self.ammo_cells < 1)
  2897.      {
  2898. @@ -526,17 +538,18 @@
  2899.  void() GrenadeTouch =
  2900.  {
  2901.      if (other == self.owner)
  2902. -        return;        // don't explode on owner
  2903. +        return;         // don't explode on owner
  2904.      if (other.takedamage == DAMAGE_AIM)
  2905.      {
  2906.          GrenadeExplode();
  2907.          return;
  2908.      }
  2909. -    sound (self, CHAN_WEAPON, "weapons/bounce.wav", 1, ATTN_NORM);    // bounce sound
  2910. +    sound (self, CHAN_WEAPON, "weapons/bounce.wav", 1, ATTN_NORM);  // bounce sound
  2911.      if (self.velocity == '0 0 0')
  2912.          self.avelocity = '0 0 0';
  2913.  };
  2914.  
  2915. +
  2916.  /*
  2917.  ================
  2918.  W_FireGrenade
  2919. @@ -544,7 +557,8 @@
  2920.  */
  2921.  void() W_FireGrenade =
  2922.  {
  2923. -    local    entity missile, mpuff;
  2924. +    local   entity missile, mpuff;
  2925. +    local   vector recoil;
  2926.      
  2927.      self.currentammo = self.ammo_rockets = self.ammo_rockets - 1;
  2928.      
  2929. @@ -558,7 +572,7 @@
  2930.      missile.solid = SOLID_BBOX;
  2931.      missile.classname = "grenade";
  2932.          
  2933. -// set missile speed    
  2934. +// set missile speed    
  2935.  
  2936.      makevectors (self.v_angle);
  2937.  
  2938. @@ -571,19 +585,31 @@
  2939.          missile.velocity_z = 200;
  2940.      }
  2941.  
  2942. +    recoil = missile.velocity * 0.234;  //CN_PATCH calculate recoil
  2943. +
  2944.      missile.avelocity = '300 300 300';
  2945.  
  2946.      missile.angles = vectoangles(missile.velocity);
  2947.      
  2948.      missile.touch = GrenadeTouch;
  2949.      
  2950. -// set missile duration
  2951. -    missile.nextthink = time + 2.5;
  2952. -    missile.think = GrenadeExplode;
  2953.  
  2954.      setmodel (missile, "progs/grenade.mdl");
  2955. -    setsize (missile, '0 0 0', '0 0 0');        
  2956. +    setsize (missile, '0 0 0', '0 0 0');            
  2957.      setorigin (missile, self.origin);
  2958. +
  2959. +//CN_PATCH - Aug 96: Setup for missiles in water and player recoil
  2960. +    missile.nextthink = time + 0.1;
  2961. +    missile.duration = time + 2.5;
  2962. +    missile.think = CN_Missile_Think;
  2963. +    missile.jump_flag = FALSE;  //id's fields used for our own purpose
  2964. +    missile.swim_flag = FALSE;
  2965. +
  2966. +    //Give the player some good 'ol Newtonian recoil
  2967. +    self.velocity = self.velocity - recoil;
  2968. +    self.avelocity = vectoangles(self.velocity);
  2969. +//END CN_PATCH
  2970. +
  2971.  };
  2972.  
  2973.  
  2974. @@ -611,19 +637,25 @@
  2975.      
  2976.      newmis.touch = spike_touch;
  2977.      newmis.classname = "spike";
  2978. -    newmis.think = SUB_Remove;
  2979. -    newmis.nextthink = time + 6;
  2980.      setmodel (newmis, "progs/spike.mdl");
  2981. -    setsize (newmis, VEC_ORIGIN, VEC_ORIGIN);        
  2982. +    setsize (newmis, VEC_ORIGIN, VEC_ORIGIN);               
  2983.      setorigin (newmis, org);
  2984.  
  2985.      newmis.velocity = dir * 1000;
  2986. +
  2987. +//CN_PATCH - Aug 96: Setup for missiles in water and player recoil
  2988. +    newmis.nextthink = time + 0.1;
  2989. +    newmis.duration = time + 6;
  2990. +    newmis.think = CN_Missile_Think;
  2991. +    newmis.jump_flag = FALSE;  //id's fields used for our own purpose
  2992. +    newmis.swim_flag = FALSE;
  2993. +//END CN_PATCH
  2994.  };
  2995.  
  2996.  void() W_FireSuperSpikes =
  2997.  {
  2998. -    local vector    dir;
  2999. -    local entity    old;
  3000. +    local vector    dir;
  3001. +    local entity    old;
  3002.      
  3003.      sound (self, CHAN_WEAPON, "weapons/spike2.wav", 1, ATTN_NORM);
  3004.      self.attack_finished = time + 0.2;
  3005. @@ -632,14 +664,14 @@
  3006.      launch_spike (self.origin + '0 0 16', dir);
  3007.      newmis.touch = superspike_touch;
  3008.      setmodel (newmis, "progs/s_spike.mdl");
  3009. -    setsize (newmis, VEC_ORIGIN, VEC_ORIGIN);        
  3010. +    setsize (newmis, VEC_ORIGIN, VEC_ORIGIN);               
  3011.      self.punchangle_x = -2;
  3012.  };
  3013.  
  3014.  void(float ox) W_FireSpikes =
  3015.  {
  3016. -    local vector    dir;
  3017. -    local entity    old;
  3018. +    local vector    dir;
  3019. +    local entity    old;
  3020.      
  3021.      makevectors (self.v_angle);
  3022.      
  3023. @@ -675,7 +707,7 @@
  3024.          return;
  3025.  
  3026.      if (other.solid == SOLID_TRIGGER)
  3027. -        return;    // trigger field, do nothing
  3028. +        return; // trigger field, do nothing
  3029.  
  3030.      if (pointcontents(self.origin) == CONTENT_SKY)
  3031.      {
  3032. @@ -715,7 +747,7 @@
  3033.          return;
  3034.  
  3035.      if (other.solid == SOLID_TRIGGER)
  3036. -        return;    // trigger field, do nothing
  3037. +        return; // trigger field, do nothing
  3038.  
  3039.      if (pointcontents(self.origin) == CONTENT_SKY)
  3040.      {
  3041. @@ -753,7 +785,7 @@
  3042.  
  3043.  void() W_SetCurrentAmmo =
  3044.  {
  3045. -    player_run ();        // get out of any weapon firing states
  3046. +    player_run ();          // get out of any weapon firing states
  3047.  
  3048.      self.items = self.items - ( self.items & (IT_SHELLS | IT_NAILS | IT_ROCKETS | IT_CELLS) );
  3049.      
  3050. @@ -822,7 +854,7 @@
  3051.  
  3052.  float() W_BestWeapon =
  3053.  {
  3054. -    local    float    it;
  3055. +    local   float   it;
  3056.      
  3057.      it = self.items;
  3058.  
  3059. @@ -871,24 +903,25 @@
  3060.  An attack impulse can be triggered now
  3061.  ============
  3062.  */
  3063. -void()    player_axe1;
  3064. -void()    player_axeb1;
  3065. -void()    player_axec1;
  3066. -void()    player_axed1;
  3067. -void()    player_shot1;
  3068. -void()    player_nail1;
  3069. -void()    player_light1;
  3070. -void()    player_rocket1;
  3071. +void()  player_axe1;
  3072. +void()  player_axeb1;
  3073. +void()  player_axec1;
  3074. +void()  player_axed1;
  3075. +void()  player_shot1;
  3076. +void()  player_nail1;
  3077. +void()  player_light1;
  3078. +void()  player_rocket1;
  3079.  
  3080.  void() W_Attack =
  3081.  {
  3082. -    local    float    r;
  3083. +    local   float   r;
  3084. +    local   string  s;
  3085.  
  3086.      if (!W_CheckNoAmmo ())
  3087.          return;
  3088.  
  3089. -    makevectors    (self.v_angle);            // calculate forward angle for velocity
  3090. -    self.show_hostile = time + 1;    // wake monsters up
  3091. +    makevectors     (self.v_angle);                 // calculate forward angle for velocity
  3092. +    self.show_hostile = time + 1;   // wake monsters up
  3093.  
  3094.      if (self.weapon == IT_AXE)
  3095.      {
  3096. @@ -906,15 +939,97 @@
  3097.      }
  3098.      else if (self.weapon == IT_SHOTGUN)
  3099.      {
  3100. +
  3101. +//CN_PATCH - Aug 96: calculate jamming of shotgun
  3102. +      if (self.use_counter_shot > 20)
  3103. +      {
  3104. +        //re-init for next sample quanta
  3105. +        self.use_counter_shot = 0.0;
  3106. +        self.use_av_shot = 0.0;
  3107. +        self.use_last_shot = time;
  3108. +      } else 
  3109. +      {
  3110. +        // get average firing rate
  3111. +        self.use_counter_shot = self.use_counter_shot + 1.0;
  3112. +        self.use_av_shot = (self.use_av_shot + (time - self.use_last_shot))/2.0;
  3113. +        self.use_last_shot = time;
  3114. +      }
  3115. +
  3116. +      //look at whether to jam weapon or not
  3117. +      if ((self.use_counter_shot > 6.0) && (self.jammed_shot < 1.0))
  3118. +      {
  3119. +        //firing more than 6 - start testing over-use
  3120. +        if ((self.use_av_shot < 0.52) && (random() > 0.93))
  3121. +        {
  3122. +          self.jammed_shot = 1.0;
  3123. +        }
  3124. +      } else
  3125. +      {
  3126. +        //look at unjaming the weapon
  3127. +        if ((self.use_av_shot > 2.0) && (self.use_counter_shot > 6.0)) {
  3128. +          self.jammed_shot = 0.0;
  3129. +          sprint (self, "Unjammed the Shotgun!\n");
  3130. +        }
  3131. +      }
  3132. +      
  3133. +      if (self.jammed_shot < 1.0)
  3134. +      {
  3135.          player_shot1 ();
  3136.          W_FireShotgun ();
  3137.          self.attack_finished = time + 0.5;
  3138. +      } else
  3139. +      {
  3140. +        sprint (self,"Shotgun jammed!\n");
  3141. +        self.attack_finished = time + 0.4;
  3142. +      }
  3143. +//END CN_PATCH
  3144.      }
  3145.      else if (self.weapon == IT_SUPER_SHOTGUN)
  3146.      {
  3147. +
  3148. +//CN_PATCH - Aug 96: calculate jamming of s-shotgun
  3149. +      if (self.use_counter_ss > 20)
  3150. +      {
  3151. +        //re-init for next sample quanta
  3152. +        self.use_counter_ss = 0.0;
  3153. +        self.use_av_ss = 0.0;
  3154. +        self.use_last_ss = time;
  3155. +      } else 
  3156. +      {
  3157. +        // get average firing rate
  3158. +        self.use_counter_ss = self.use_counter_ss + 1.0;
  3159. +        self.use_av_ss = (self.use_av_ss + (time - self.use_last_ss))/2.0;
  3160. +        self.use_last_ss = time;
  3161. +      }
  3162. +
  3163. +      //look at whether to jam weapon or not
  3164. +      if ((self.use_counter_ss > 6.0) && (self.jammed_ss < 1.0))
  3165. +      {
  3166. +        //firing more than 6 - start testing over-use
  3167. +        if ((self.use_av_ss < 0.74) && (random() > 0.86))
  3168. +        {
  3169. +          self.jammed_ss = 1.0;
  3170. +        }
  3171. +      } else
  3172. +      {
  3173. +        //look at unjaming the weapon
  3174. +        if ((self.use_av_ss > 3.0) && (self.use_counter_ss > 6.0)) {
  3175. +          self.jammed_ss = 0.0;
  3176. +          sprint (self,"Unjammed the Super-Shotgun!\n");
  3177. +        }
  3178. +      }
  3179. +      
  3180. +      if (self.jammed_ss < 1.0)
  3181. +      {
  3182.          player_shot1 ();
  3183.          W_FireSuperShotgun ();
  3184.          self.attack_finished = time + 0.7;
  3185. +      } else
  3186. +      {
  3187. +        sprint (self,"Super-Shotgun jammed!\n");
  3188. +        self.attack_finished = time + 0.6;
  3189. +      }
  3190. +//END CN_PATCH
  3191.      }
  3192.      else if (self.weapon == IT_NAILGUN)
  3193.      {
  3194. @@ -926,15 +1041,111 @@
  3195.      }
  3196.      else if (self.weapon == IT_GRENADE_LAUNCHER)
  3197.      {
  3198. +//CN_PATCH - Aug 96: calculate if GL blows up
  3199. +      if (self.use_counter_gl > 10)
  3200. +      {
  3201. +        //re-init for next sample quanta
  3202. +        self.use_counter_gl = 0.0;
  3203. +        self.use_av_gl = 0.0;
  3204. +        self.use_last_gl = time;
  3205. +      } else 
  3206. +      {
  3207. +        // get average firing rate
  3208. +        self.use_counter_gl = self.use_counter_gl + 1.0;
  3209. +        self.use_av_gl = (self.use_av_gl + (time - self.use_last_gl))/2.0;
  3210. +        self.use_last_gl = time;
  3211. +      }
  3212. +
  3213. +      //look at whether to jam weapon or not
  3214. +      if ((self.use_counter_gl > 4.0) && (self.jammed_gl < 1.0))
  3215. +      {
  3216. +        //firing more than 4 - start testing over-use
  3217. +        if ((self.use_av_gl < 0.64) && (random() > 0.65))
  3218. +        {
  3219. +          self.jammed_gl = 1.0;
  3220. +        }
  3221. +      } else
  3222. +      {
  3223. +        //look at unjaming the weapon
  3224. +        if ((self.use_av_gl > 3.0) && (self.use_counter_gl > 6.0)) {
  3225. +          self.jammed_gl = 0.0;
  3226. +          sprint (self,"Unjammed the Grenade Launcher!\n");
  3227. +        }
  3228. +      }
  3229. +      
  3230. +      if (self.jammed_gl < 1.0)
  3231. +      {
  3232.          player_rocket1();
  3233.          W_FireGrenade();
  3234.          self.attack_finished = time + 0.6;
  3235. +      } else
  3236. +      {
  3237. +            if (teamplay == 1)
  3238. +            {
  3239. +              //can't blow up so message
  3240. +          sprint (self,"Grenade Launcher jammed!\n");
  3241. +              self.attack_finished = time + 0.5;
  3242. +            } else
  3243. +            {
  3244. +          self.jammed_death = 1;
  3245. +          T_RadiusDamage (self, self, 35*self.ammo_rockets, world);
  3246. +            }
  3247. +      }
  3248. +//END CN_PATCH
  3249.      }
  3250.      else if (self.weapon == IT_ROCKET_LAUNCHER)
  3251.      {
  3252. +//CN_PATCH - Aug 96: calculate if RL blows up
  3253. +      if (self.use_counter_rocket > 10)
  3254. +      {
  3255. +        //re-init for next sample quanta
  3256. +        self.use_counter_rocket = 0.0;
  3257. +        self.use_av_rocket = 0.0;
  3258. +        self.use_last_rocket = time;
  3259. +      } else 
  3260. +      {
  3261. +        // get average firing rate
  3262. +        self.use_counter_rocket = self.use_counter_rocket + 1.0;
  3263. +        self.use_av_rocket = (self.use_av_rocket + (time - self.use_last_rocket))/2.0;
  3264. +        self.use_last_rocket = time;
  3265. +      }
  3266. +
  3267. +      //look at whether to jam weapon or not
  3268. +      if ((self.use_counter_rocket > 3.0) && (self.jammed_rocket < 1.0))
  3269. +      {
  3270. +        //firing more than 3 - start testing over-use
  3271. +        if ((self.use_av_rocket < 0.9) && (random() > 0.58))
  3272. +        {
  3273. +          self.jammed_rocket = 1.0;
  3274. +        }
  3275. +      } else
  3276. +      {
  3277. +        //look at unjaming the weapon
  3278. +        if ((self.use_av_rocket > 3.0) && (self.use_counter_rocket > 6.0)) {
  3279. +          self.jammed_rocket = 0.0;
  3280. +          sprint (self,"Unjammed the Rocket Launcher!\n");
  3281. +        }
  3282. +      }
  3283. +      
  3284. +      if (self.jammed_rocket < 1.0)
  3285. +      {
  3286.          player_rocket1();
  3287.          W_FireRocket();
  3288.          self.attack_finished = time + 0.8;
  3289. +      } else
  3290. +      {
  3291. +            if (teamplay == 1)
  3292. +            {
  3293. +              //can't blow up so message
  3294. +          sprint (self,"Rocket Launcher jammed!\n");
  3295. +              self.attack_finished = time + 0.7;
  3296. +            } else
  3297. +            {
  3298. +          self.jammed_death = 2;
  3299. +          T_RadiusDamage (self, self, 35*self.ammo_rockets, world);
  3300. +            }
  3301. +      }
  3302. +//END CN_PATCH
  3303.      }
  3304.      else if (self.weapon == IT_LIGHTNING)
  3305.      {
  3306. @@ -952,7 +1163,7 @@
  3307.  */
  3308.  void() W_ChangeWeapon =
  3309.  {
  3310. -    local    float    it, am, fl;
  3311. +    local   float   it, am, fl;
  3312.      
  3313.      it = self.items;
  3314.      am = 0;
  3315. @@ -972,7 +1183,7 @@
  3316.          fl = IT_SUPER_SHOTGUN;
  3317.          if (self.ammo_shells < 2)
  3318.              am = 1;
  3319. -    }        
  3320. +    }               
  3321.      else if (self.impulse == 4)
  3322.      {
  3323.          fl = IT_NAILGUN;
  3324. @@ -1007,13 +1218,13 @@
  3325.      self.impulse = 0;
  3326.      
  3327.      if (!(self.items & fl))
  3328. -    {    // don't have the weapon or the ammo
  3329. +    {       // don't have the weapon or the ammo
  3330.          sprint (self, "no weapon.\n");
  3331.          return;
  3332.      }
  3333.      
  3334.      if (am)
  3335. -    {    // don't have the ammo
  3336. +    {       // don't have the ammo
  3337.          sprint (self, "not enough ammo.\n");
  3338.          return;
  3339.      }
  3340. @@ -1021,7 +1232,7 @@
  3341.  //
  3342.  // set weapon, set ammo
  3343.  //
  3344. -    self.weapon = fl;        
  3345. +    self.weapon = fl;               
  3346.      W_SetCurrentAmmo ();
  3347.  };
  3348.  
  3349. @@ -1065,7 +1276,7 @@
  3350.  */
  3351.  void() CycleWeaponCommand =
  3352.  {
  3353. -    local    float    it, am;
  3354. +    local   float   it, am;
  3355.      
  3356.      it = self.items;
  3357.      self.impulse = 0;
  3358. @@ -1089,7 +1300,7 @@
  3359.              self.weapon = IT_SUPER_SHOTGUN;
  3360.              if (self.ammo_shells < 2)
  3361.                  am = 1;
  3362. -        }        
  3363. +        }               
  3364.          else if (self.weapon == IT_SUPER_SHOTGUN)
  3365.          {
  3366.              self.weapon = IT_NAILGUN;
  3367. @@ -1169,6 +1380,8 @@
  3368.          CycleWeaponCommand ();
  3369.      if (self.impulse == 11)
  3370.          ServerflagsCommand ();
  3371. +    if (self.impulse == 20)
  3372. +      CN_Ditch_Rockets ();
  3373.  
  3374.      if (self.impulse == 255)
  3375.          QuadCheat ();
  3376.